/* Island Lab — shared chrome for section indexes and posts.
 *
 * Section pages (concepts/, philosophies/, explorations/) and the individual
 * posts inside them all link this file plus theme.css. A new post is just a
 * copy of an existing one with the prose swapped, so this holds everything
 * structural: the night palette, nav, the post article, and the index list.
 *
 * Load order in each page's <head>: fonts, then post.css, then theme.css.
 */

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

:root {
  --bg: #0e1410;
  --surface: #141a16;
  --text: #d6cfc0;
  --muted: #6b6358;
  --accent: #4a7c68;
  --faint: #1e2820;
  --line: #4a7c68;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.85;
  overflow-x: hidden;
}

/* ---- Nav ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
  background: linear-gradient(var(--bg), transparent);
}
.nav-left { display: flex; flex-wrap: wrap; gap: 1.6rem; align-items: center; }
.nav-home {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color 0.3s;
}
.nav-home:hover, .nav-home.here { color: var(--text); }

/* ---- Shared hero ---- */
.wrap { max-width: 680px; margin: 0 auto; padding: 0 2rem; }

.hero {
  padding: 9rem 0 1rem;
  position: relative;
}
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.75rem; display: block;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400; font-style: italic; line-height: 1.2;
  color: var(--text); margin-bottom: 1.5rem; max-width: 22ch;
}
.hero-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.5rem;
}
.hero-sub { font-size: 1.1rem; color: var(--muted); line-height: 1.8; max-width: 52ch; }

.rule {
  width: 1px; height: 70px;
  background: linear-gradient(transparent, var(--accent), transparent);
  margin: 3rem auto 3.5rem; opacity: 0.5;
}

/* ---- Post header image ---- */
.hero-image { margin: 2.5rem 0 3.5rem; }
.hero-image img {
  width: 100%; height: auto; display: block;
  border-radius: 6px;
}

/* ---- Post article ---- */
.post { padding-bottom: 5rem; }
.post p { color: var(--muted); font-size: 1.13rem; margin-bottom: 0.8rem; line-height: 1.85; }
.post p:last-child { margin-bottom: 0; }
.post p em { font-style: italic; color: var(--text); }
.post p strong { color: var(--text); font-weight: 500; }
.post h2 {
  font-size: 1.5rem; font-weight: 400; font-style: italic;
  color: var(--text); margin: 3rem 0 1.25rem; line-height: 1.3;
}
.post h3 {
  font-size: 1.15rem; font-weight: 500; font-style: italic;
  color: var(--text); margin: 2rem 0 0.5rem; line-height: 1.35;
}
.post .num {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); display: block; margin: 2.25rem 0 0.85rem; opacity: 0.85;
}
.post a {
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--accent-line); transition: border-color 0.2s, color 0.2s;
}
.post a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.post .pull {
  border-left: 1px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.75rem; margin: 2.5rem 0;
}
.post .pull p { font-size: 1.22rem; font-style: italic; color: var(--text); line-height: 1.65; margin: 0; }
.post .sep {
  text-align: center; color: var(--accent); opacity: 0.35;
  font-size: 1rem; letter-spacing: 0.5em; margin: 2.5rem 0;
}

/* Cards used inside posts (lineages, layers) */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin: 1.5rem 0 2rem; }
.card-grid.two { grid-template-columns: 1fr 1fr; }
.card {
  border: 1px solid var(--faint); border-radius: 10px; background: var(--card-bg);
  padding: 1.6rem 1.75rem; transition: border-color 0.3s, background 0.3s;
}
.card:hover { border-color: var(--accent-soft); background: var(--card-bg-hover); }
.card-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem; opacity: 0.9;
}
.card h4 {
  font-size: 1.18rem; font-weight: 400; font-style: italic;
  color: var(--text); margin-bottom: 0.75rem; line-height: 1.3;
}
.card p { color: var(--muted); font-size: 1rem; line-height: 1.78; margin: 0; }
.card p em { color: var(--text); font-style: italic; }
.card p a, .post .card p a { border-bottom: 1px solid var(--accent-line); }

/* ---- Section index ---- */
.post-list { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 2rem; }
a.post-row {
  border: 1px solid var(--faint); border-radius: 10px; background: var(--card-bg);
  padding: 1.85rem 2rem; text-decoration: none; color: inherit;
  display: block; transition: border-color 0.3s, background 0.3s;
}
a.post-row:hover { border-color: var(--accent-soft); background: var(--card-bg-hover); }
.pr-meta {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); opacity: 0.85; margin-bottom: 1rem;
}
.pr-meta .tag { color: var(--muted); }
.pr-title {
  font-size: 1.4rem; font-weight: 400; font-style: italic;
  color: var(--text); margin-bottom: 0.75rem; line-height: 1.3;
}
.pr-excerpt { color: var(--muted); font-size: 1.05rem; line-height: 1.8; margin-bottom: 1rem; }
.pr-excerpt em { color: var(--text); font-style: italic; }
.pr-more {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); border-bottom: 1px solid var(--accent-line); padding-bottom: 2px;
}
a.post-row:hover .pr-more { color: var(--text); border-color: var(--text); }

.idx-note {
  border: 1px dashed var(--faint); border-radius: 10px; background: transparent;
  padding: 1.85rem 2rem; color: var(--muted); font-size: 1.02rem; line-height: 1.8;
}
.idx-note em { color: var(--text); font-style: italic; }

/* ---- Footer / back ---- */
.post-foot { padding: 2.5rem 0 1rem; }
.foot-link {
  display: inline-block; margin-right: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent-line); padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.foot-link:hover { color: var(--text); border-color: var(--text); }

footer {
  text-align: center; padding: 2rem;
  border-top: 1px solid var(--faint);
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); opacity: 0.5; margin-top: 3rem;
}

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 700px) { .card-grid.two { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  nav { padding: 1.25rem 1.5rem; }
  .nav-left { gap: 1rem; }
  .hero { padding-top: 7.5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
