/* ============================================================
   Su Adams — philosophical / speculative fiction
   Dark "gallery at night" aesthetic. Restrained, curated, warm
   at the edges. Covers are inline SVG; swap for real art later.
   ============================================================ */

:root {
  --bg: #0b0d12;
  --bg-2: #101420;
  --ink: #e9ebe6;
  --ink-soft: #a9adb0;
  --ink-faint: #6c7074;
  --teal: #7dd7c8;
  --blue: #5aa7ff;
  --amber: #e8b567;
  --oxblood: #b04a3a;
  --rule: rgba(233, 235, 230, 0.14);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 68ch;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(90, 167, 255, 0.10), transparent 60%),
    radial-gradient(1000px 700px at 10% 110%, rgba(125, 215, 200, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .masthead, .footer { position: relative; z-index: 2; }

::selection { background: rgba(125, 215, 200, 0.28); color: #fff; }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: linear-gradient(to bottom, rgba(11, 13, 18, 0.85), rgba(11, 13, 18, 0));
  z-index: 10;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.nav { display: flex; gap: 1.8rem; }
.nav a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.25s ease;
}
.nav a:hover { color: var(--teal); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) clamp(1.2rem, 5vw, 2rem) clamp(2rem, 5vw, 3rem);
  text-align: left;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}
.hero-sub {
  margin-top: 1.6rem;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.hero-cta {
  display: inline-block;
  margin-top: 2.2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}
.hero-cta:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }

/* ---------- rule ---------- */
.rule {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 0 0;
}
.rule span {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--teal); opacity: 0.5;
}
.rule span:nth-child(2) { background: var(--amber); }

/* ---------- sections ---------- */
section { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) clamp(1.2rem, 5vw, 2rem); }
.section-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 3rem;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 3rem; height: 1px;
  background: var(--teal);
  margin-top: 0.8rem;
  opacity: 0.6;
}

/* ---------- works ---------- */
.work {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: clamp(1.6rem, 4vw, 2.8rem);
  align-items: start;
  padding: 2.4rem 0;
  border-top: 1px solid var(--rule);
}
.work:first-of-type { border-top: none; padding-top: 0; }

.cover {
  position: sticky;
  top: 5.4rem;
}
.cover-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s;
}
.work:hover .cover-art {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 0 26px 50px -12px rgba(0, 0, 0, 0.8);
}
.cover-title { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: 0.06em; }
.cover-title-dark { letter-spacing: 0.08em; }
.cover-author { font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; }
.cover-tizz .cover-title { font-size: 30px; }

/* svg animation hooks */
.cover-uhhsthetic .ring { animation: spin 26s linear infinite; transform-origin: 100px 118px; }
.cover-uhhsthetic .specks circle { animation: twinkle 4s ease-in-out infinite; }
.cover-uhhsthetic .specks circle:nth-child(odd) { animation-delay: 1.4s; }
.cover-tizz .clock { animation: spin 40s linear infinite; transform-origin: 100px 130px; }
.cover-lavache .dew { animation: breathe 5s ease-in-out infinite; transform-origin: 100px 150px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.work-body { min-width: 0; }
.work-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
}
.work-meta { margin: 0.7rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
}
.tag-soon { color: var(--amber); border-color: rgba(232, 181, 103, 0.4); }
a.tag:hover { color: var(--teal); border-color: var(--teal); }
.work-desc { color: var(--ink-soft); font-size: 1rem; max-width: 60ch; }
.work-links { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #0b0d12;
  background: var(--teal);
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  transition: transform 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); background: #93e6d8; }
.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--rule);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-faint); background: transparent; }
.retailer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.retailer-link:hover { color: var(--ink); border-color: var(--teal); transform: translateY(-1px); }
.retailer-link img { width: 24px; height: 24px; object-fit: cover; border-radius: 5px; }
.note { font-family: var(--mono); font-size: 0.75rem; color: var(--amber); letter-spacing: 0.08em; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: 1.4rem; }
.about-bio { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.4; max-width: 34ch; }
.about-note { color: var(--ink-soft); max-width: 56ch; }
.about-note a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(125, 215, 200, 0.35); }
.about-note a:hover { border-bottom-color: var(--teal); }

/* ---------- contact ---------- */
.contact-line { color: var(--ink-soft); font-size: 1.02rem; }
.contact-mail { color: var(--ink); font-family: var(--mono); text-decoration: none; border-bottom: 1px solid var(--rule); transition: color 0.2s, border-color 0.2s; }
.contact-mail:hover { color: var(--teal); border-color: var(--teal); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem clamp(1.2rem, 5vw, 2rem) 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.footer p { white-space: nowrap; }
.footer-alt a { color: var(--ink-faint); text-decoration: none; }
.footer-alt a:hover { color: var(--teal); }

/* ---------- blog: home writing feed ---------- */
.writing-shows { display: flex; gap: 0.6rem 1.4rem; flex-wrap: wrap; margin: -1.4rem 0 2.2rem; }
.writing-shows a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint); text-decoration: none;
}
.writing-shows a:hover { color: var(--teal); }
.post-list { list-style: none; }
.post-row { border-top: 1px solid var(--rule); }
.post-row a {
  display: grid;
  grid-template-columns: 7.4rem 1fr auto;
  align-items: baseline;
  gap: 1.2rem;
  padding: 1.1rem 0;
  text-decoration: none;
  color: inherit;
}
.post-row:hover .post-row-title { color: var(--teal); }
.post-row-date { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.04em; }
.post-row-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; transition: color 0.2s; }
.post-row-kind {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
  border: 1px solid var(--rule); padding: 0.2rem 0.6rem; border-radius: 999px;
  white-space: nowrap;
}
.post-row:hover .post-row-kind { border-color: var(--ink-faint); }
.post-row-desc { display: none; }

/* ---------- blog: page hero ---------- */
.page-hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) clamp(1.2rem, 5vw, 2rem) 1rem; }
.page-hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em;
}
.page-hero .page-sub { margin-top: 0.8rem; color: var(--ink-soft); max-width: 52ch; }
.page-eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 1.1rem;
}
.page-body { max-width: var(--maxw); margin: 0 auto; padding: 1rem clamp(1.2rem, 5vw, 2rem) clamp(2.5rem, 7vw, 5rem); }

/* ---------- blog: single post ---------- */
.post-head { max-width: 62ch; margin: 0 auto; padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.2rem, 5vw, 2rem) 0; }
.post-head .post-eyebrow {
  display: flex; gap: 0.9rem; align-items: center;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.3rem;
}
.post-head .post-eyebrow .pkind { color: var(--teal); }
.post-head h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -0.015em;
}
.post-head .post-meta { margin-top: 1.2rem; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-faint); letter-spacing: 0.04em; }
.post-tags { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-content { max-width: 62ch; margin: 0 auto; padding: 2rem clamp(1.2rem, 5vw, 2rem) 4rem; color: var(--ink-soft); font-size: 1.05rem; }
.post-content > *:first-child { margin-top: 0; }
.post-content p { margin: 1.4em 0; }
.post-content h2, .post-content h3, .post-content h4 {
  font-family: var(--serif); font-weight: 600; color: var(--ink);
  line-height: 1.2; margin: 2em 0 0.6em; letter-spacing: -0.01em;
}
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content h4 { font-size: 1.1rem; }
.post-content a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(125, 215, 200, 0.35); }
.post-content a:hover { border-bottom-color: var(--teal); }
.post-content blockquote {
  margin: 1.8em 0; padding: 0.2em 0 0.2em 1.4em;
  border-left: 2px solid var(--teal); color: var(--ink-soft);
  font-family: var(--serif); font-size: 1.15em; font-style: italic;
}
.post-content ul, .post-content ol { margin: 1.4em 0; padding-left: 1.6em; }
.post-content li { margin: 0.5em 0; }
.post-content pre {
  background: var(--bg-2); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.1rem 1.3rem; overflow-x: auto; margin: 1.8em 0;
}
.post-content code { font-family: var(--mono); font-size: 0.88em; color: var(--amber); }
.post-content pre code { color: var(--ink); font-size: 0.85rem; }
.post-content p code, .post-content li code { background: var(--bg-2); padding: 0.15em 0.4em; border-radius: 4px; }
.post-content img { max-width: 100%; border-radius: 6px; margin: 1.6em 0; }
.post-content hr { border: none; border-top: 1px solid var(--rule); margin: 2.6em 0; }
.post-content em { color: var(--ink); }

.post-nav {
  max-width: 62ch; margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 2rem) 4rem;
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--rule); padding-top: 2rem;
}
.post-nav a { font-family: var(--mono); font-size: 0.76rem; color: var(--ink-soft); text-decoration: none; max-width: 48%; }
.post-nav a:hover { color: var(--teal); }
.post-nav .pn-label { display: block; color: var(--ink-faint); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #field, .grain { display: none; }
  .cover .ring, .cover .clock, .cover .dew, .cover .specks circle { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .work { grid-template-columns: 1fr; }
  .cover { position: static; max-width: 220px; }
  .footer { flex-direction: column; gap: 0.6rem; text-align: center; }
  .footer p { white-space: normal; }
  .post-row { grid-template-columns: 1fr; gap: 0.4rem; padding: 1rem 0; }
  .post-row-date { order: 2; }
  .post-row-title { order: 1; }
  .post-row-kind { order: 3; justify-self: start; }
}
