/* mac.fountain.network — design tokens
 * vibe: dusk jazz club. cream paper, sunset orange, blue-world blue.
 * a literary blog about a musician. serif by default. circles everywhere.
 */

:root {
  /* light mode — warm parchment */
  --bg: #f6f0e4;
  --bg-soft: #efe6d4;
  --paper: #fbf6ec;
  --ink: #1a1410;
  --ink-soft: #3b302a;
  --muted: #786a5e;
  --rule: rgba(26, 20, 16, 0.12);

  /* accents — sunset + blue world */
  --accent: #e8714c;        /* sunset orange */
  --accent-deep: #c14e2a;
  --blue: #2e6fb8;          /* blue world */
  --blue-deep: #1d4d8b;
  --gold: #d4a017;          /* whiskey */

  /* type */
  --serif: 'Source Serif 4', 'Source Serif Pro', Charter, 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220;
    --bg-soft: #161b30;
    --paper: #131830;
    --ink: #f3ecdc;
    --ink-soft: #d8cfbe;
    --muted: #8a8a9e;
    --rule: rgba(243, 236, 220, 0.14);

    --accent: #ff8862;
    --accent-deep: #e8714c;
    --blue: #6aa4e8;
    --blue-deep: #4685cc;
    --gold: #ecc14a;
  }
}

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

html { font-size: 18px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink-soft);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* a faint texture suggestion */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(232, 113, 76, 0.05), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(46, 111, 184, 0.06), transparent 40%);
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.15s ease; }
a:hover { color: var(--accent-deep); }

/* === Layout === */

.wrap { max-width: 680px; margin: 0 auto; padding: 0 1.5rem; }
.wrap-wide { max-width: 880px; margin: 0 auto; padding: 0 1.5rem; }

header.site {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

header.site .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand:hover { color: var(--ink); }

.brand .dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-0.05em);
}

.nav-links { display: flex; gap: 1.25rem; align-items: center; }

.nav-links a {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

main { flex: 1; padding-bottom: 4rem; }

footer.site {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}

footer.site .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--accent); }

/* === Home === */

.hero {
  padding: 1rem 0 3rem;
  position: relative;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 32em;
}

.hero .circle-mark {
  position: absolute;
  top: 0;
  right: -1rem;
  opacity: 0.15;
  pointer-events: none;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.posts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 113, 76, 0.35);
  box-shadow: 0 10px 30px -15px rgba(26, 20, 16, 0.2);
}

.post-card:hover::before { transform: scaleY(1); }

.post-card .meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.post-card .meta .pip {
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

.post-card h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;
}

.post-card .summary {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* === Post page === */

article.post {
  padding-top: 1rem;
}

article.post header.post-head {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

article.post .crumbs {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

article.post .crumbs a { color: var(--blue); text-decoration: none; }
article.post .crumbs a:hover { color: var(--accent); }

article.post h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

article.post .track-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
}

article.post .track-card span strong {
  color: var(--ink-soft);
  font-weight: 600;
}

article.post .body {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

article.post .body > * + * { margin-top: 1.25rem; }

article.post .body p { font-family: var(--serif); }

article.post .body em { color: var(--accent-deep); font-style: italic; }

article.post .body strong { color: var(--ink); font-weight: 600; }

article.post .body h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-top: 2.5rem;
}

article.post .body h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  margin-top: 2rem;
}

article.post .body hr {
  border: 0;
  height: 1.5rem;
  margin: 2.5rem auto;
  background-image: radial-gradient(circle, var(--muted) 1px, transparent 1.5px);
  background-size: 14px 14px;
  background-position: center;
  background-repeat: repeat-x;
  opacity: 0.5;
  width: 60%;
}

article.post .body blockquote {
  margin-left: 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}

article.post .body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  font-family: var(--sans);
  margin: 2rem 0;
  background: var(--paper);
}

article.post .body table th,
article.post .body table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

article.post .body table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

article.post .body code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

article.post .sources {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

article.post .sources h2 {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

article.post .sources ol {
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

article.post .sources li { margin-bottom: 0.5rem; }
article.post .sources a { color: var(--blue); }

article.post .end-mark {
  margin-top: 3rem;
  text-align: center;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.3em;
}

/* === About === */

.about-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 1rem 0 3rem;
}

@media (min-width: 720px) {
  .about-hero {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

.portrait {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center,
      var(--bg-soft) 0,
      var(--bg-soft) 8px,
      var(--paper) 8px,
      var(--paper) 16px);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portrait::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(232, 113, 76, 0.4);
}

.portrait .placeholder-mark {
  font-family: var(--display);
  font-style: italic;
  font-size: 2.5rem;
  color: var(--accent);
  z-index: 1;
}

.about-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.about-hero .role {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.about-body {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.about-body > * + * { margin-top: 1.25rem; }

.about-body h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  margin-top: 2.5rem;
  letter-spacing: -0.015em;
}

.about-body em { color: var(--accent-deep); font-style: italic; }

.lens-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.lens-list li {
  padding: 1rem 1.25rem;
  background: var(--paper);
  border-left: 3px solid var(--blue);
  font-size: 1rem;
}

.lens-list li strong {
  font-family: var(--display);
  color: var(--ink);
  display: block;
  margin-bottom: 0.25rem;
}
