/* ============================================
   Thinker of Things — Site Styles
   "Elegant, playful, elevated"
   Near-black canvas · champagne gold accent ·
   classical serifs · lively motion
   ============================================ */

:root {
  --bg: #131316;
  --bg-lift: #1b1c20;
  --bg-deep: #0d0d0f;
  --ink: #f5f3ef;
  --ink-soft: rgba(245, 243, 239, 0.72);
  --gold: #c9a96a;
  --line: rgba(245, 243, 239, 0.09);
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'EB Garamond', 'Georgia', serif;
  --max-width: 1100px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- Light theme (manual toggle) ---- */
html.theme-light {
  --bg: #f7f4ec;
  --bg-lift: #efe9dc;
  --bg-deep: #ece5d6;
  --ink: #22201b;
  --ink-soft: rgba(34, 32, 27, 0.72);
  --gold: #a9863f;
  --line: rgba(34, 32, 27, 0.12);
}

/* smooth color crossfade when toggling */
body, .site-header.solid, .ticker, .section, .blog-card, .post-item,
.newsletter, .site-footer, .btn, .contact-form input, .contact-form textarea {
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

/* the hero photo/overlay stays dark in both themes — keep hero text light */
html.theme-light .hero h1,
html.theme-light .hero p.sub { color: #f5f3ef; }

/* in light mode, darken the contact field text and lines for legibility */
html.theme-light .contact-form input[type="text"],
html.theme-light .contact-form input[type="email"],
html.theme-light .contact-form textarea {
  color: var(--ink);
  border-bottom-color: rgba(34, 32, 27, 0.4);
}
html.theme-light .contact-form ::placeholder { color: rgba(34, 32, 27, 0.55); }
html.theme-light .contact-form .field-label { color: var(--ink-soft); }

/* transparent headers float over a dark hero/banner image — keep nav light in light mode */
html.theme-light .site-header:not(.solid) .site-nav a,
html.theme-light .site-header:not(.solid) .theme-toggle,
html.theme-light .site-header:not(.solid) .nav-toggle span { color: #f5f3ef; }
html.theme-light .site-header:not(.solid) .nav-toggle span { background: #f5f3ef; }
html.theme-light .site-header:not(.solid) .site-title { color: #c9a96a; }

/* keep the page banner (About) reading as dark in light mode so its text stays visible */
html.theme-light .page-banner { background: #0d0d0f; }
html.theme-light .page-banner .eyebrow { color: #c9a96a; }
html.theme-light .page-banner h1 { color: #f5f3ef; }

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

/* visually-hidden label, still read by screen readers */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* clear keyboard-focus outline for anyone tabbing through the site */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
  animation: page-in 0.6s ease both;
}

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.3rem; }
h3 { font-size: 1.7rem; }

a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* Eyebrow labels */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 1.6rem 2.2rem;
  display: flex;
  align-items: center;
}
.site-title { margin-right: auto; }   /* pushes nav + toggle to the right */

.site-header.solid { position: relative; background: var(--bg-deep); border-bottom: 1px solid var(--line); }

.site-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--gold);
}

.site-nav a {
  text-decoration: none;
  margin-left: 2.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  position: relative;
  padding-bottom: 4px;
  transition: opacity 0.3s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover { opacity: 1; color: var(--gold); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 2.2rem;
  padding: 0;
  color: var(--gold);
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.theme-toggle:hover { opacity: 1; transform: rotate(20deg); }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .icon-sun { display: none; }
html.theme-light .theme-toggle .icon-moon { display: none; }
html.theme-light .theme-toggle .icon-sun { display: block; }

@media (max-width: 640px) {
  .theme-toggle { margin-left: 0; margin-top: 0.4rem; }
}

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
  display: block; width: 28px; height: 2px;
  background: var(--ink); margin: 6px 0;
  transition: transform 0.3s;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #0d0d0f;                 /* dropdown stays dark in both themes */
    padding: 1rem 2.2rem 1.6rem;
    border-bottom: 1px solid rgba(245, 243, 239, 0.12);
  }
  .site-nav.open { display: flex; flex-direction: column; gap: 1.1rem; }
  .site-nav a { margin-left: 0; font-size: 0.95rem; color: #f5f3ef; }
  .site-nav a:hover { color: var(--gold); }
  /* center the wordmark between the hamburger and the theme toggle */
  .site-title { margin-right: 0; flex: 1; text-align: center; }
}

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}

.ticker-inner {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: ticker-scroll 22s linear infinite;
  padding: 0.65rem 0;
}

.ticker-inner span {
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 1.7rem;
}

@keyframes ticker-scroll { to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: url('../images/about-photo-1.webp') center 17% / cover no-repeat;
  transform: scale(1.05);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.05) translateY(0); }
  to   { transform: scale(1.12) translateY(-1.5%); }
}

.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,15,0.72) 0%, rgba(13,13,15,0.55) 45%, rgba(19,19,22,0.92) 100%);
}

.hero > *:not(.hero-bg) { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  max-width: 800px;
  margin-bottom: 1rem;
}

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

.hero p.sub { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 2.4rem; }

/* Staggered word reveal */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px) rotate(2deg);
  animation: word-rise 0.75s var(--ease) forwards;
}

@keyframes word-rise { to { opacity: 1; transform: none; } }

/* Heart-star logo mark */
.logo-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  background: url('../images/mark-gold.png') center / contain no-repeat;
}

/* Spinning asterisk mark */
.spin-mark {
  display: inline-block;
  color: var(--gold);
  animation: spin 9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.word.spin-mark { animation: word-rise 0.75s var(--ease) forwards, spin 9s linear 1s infinite; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  position: relative;
  padding: 1rem 2.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.45s var(--ease);
  z-index: 0;
}

.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform 0.45s var(--ease);
  z-index: -1;
}

.btn:hover { color: var(--bg-deep); }
.btn:hover::before { transform: none; }

/* ---------- Sections ---------- */

.section { padding: 7rem 0; }
.section.black { background: var(--bg-deep); }
.section.dark { background: var(--bg); }
.section.bright { background: var(--bg-lift); }
.section + .section { border-top: 1px solid var(--line); }

.section-title { text-align: center; margin-bottom: 4rem; }
.section-head { text-align: center; margin-bottom: 4rem; }
.section-head h2 { margin-bottom: 0; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Blog cards ---------- */

.blog-card {
  max-width: 680px;
  margin: 0 auto 3.5rem;
  background: var(--bg-lift);
  border: 1px solid var(--line);
  padding: 2rem 2.2rem 2.4rem;
  text-align: left;
  transition: transform 0.5s var(--ease), border-color 0.5s, box-shadow 0.5s;
}

.blog-card:hover {
  transform: translateY(-8px) rotate(-0.8deg);
  border-color: var(--gold);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.blog-card:last-child { margin-bottom: 0; }

.blog-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-bottom: 1.6rem;
  filter: saturate(0.92);
  transition: filter 0.5s;
}

.blog-card:hover img { filter: saturate(1.05); }

.blog-card .meta {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.6rem;
}

.blog-card h3 { font-size: 1.8rem; margin-bottom: 0.8rem; }
.blog-card p { color: var(--ink-soft); margin-bottom: 1.4rem; }

.read-more {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}

.read-more .arrow { display: inline-block; transition: transform 0.45s var(--ease); }
.blog-card:hover .read-more .arrow, .read-more:hover .arrow { transform: translateX(8px); }

/* ---------- About grid ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 940px;
  margin: 0 auto;
}

.about-grid img {
  width: 100%;
  border: 1px solid var(--line);
  transition: transform 0.6s var(--ease);
}

.about-grid img:hover { transform: scale(1.02) rotate(0.6deg); }

@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- Forms (underlined minimal) ---------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  align-items: center;
  max-width: 460px;
  margin: 0 auto;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 243, 239, 0.3);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.7rem 0.2rem;
  transition: border-color 0.4s;
  resize: vertical;
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.contact-form ::placeholder { color: rgba(245, 243, 239, 0.45); }

.contact-form .field-label {
  width: 100%;
  text-align: left;
  font-style: normal;
  font-size: 1rem;
  color: rgba(245, 243, 239, 0.6);
  margin-bottom: -1rem;
}

/* ---------- Page banner ---------- */

.page-banner {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-deep);
  overflow: hidden;
}

.page-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transform: scale(1.04);
  animation: hero-drift 20s ease-in-out infinite alternate;
}

.page-banner .banner-text { position: relative; z-index: 1; padding: 6rem 1rem 3rem; }

/* ---------- Prose ---------- */

/* short one-line "beats" that stand alone */
.prose .beat {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  line-height: 1.35;
  font-style: italic;
  color: var(--gold);
  text-align: center;
  margin: 3rem auto;
  max-width: 90%;
}

/* photos that float inline within the essay */
.prose img.about-float {
  float: right;
  width: 46%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 55% 85%;
  margin: 0.4rem 0 1.4rem 2rem;
  border: 1px solid var(--line);
}
.prose img.about-float.left {
  float: left;
  margin: 0.4rem 2rem 1.4rem 0;
}
@media (max-width: 640px) {
  .prose img.about-float,
  .prose img.about-float.left { float: none; width: 100%; margin: 2rem 0; }
}

.prose { max-width: 660px; margin: 0 auto; }
.prose p { margin-bottom: 1.7rem; color: var(--ink-soft); }
.prose .pull {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  line-height: 1.4;
  color: var(--ink);
  margin: 3rem 0;
  padding-left: 1.6rem;
  border-left: 1px solid var(--gold);
}
.prose img { margin: 3rem auto; border: 1px solid var(--line); }

/* ---------- Journal list ---------- */

.post-list { max-width: 680px; margin: 0 auto; }

.post-item {
  text-align: left;
  margin-bottom: 3.5rem;
  background: var(--bg-lift);
  border: 1px solid var(--line);
  padding: 2rem 2.2rem 2.4rem;
  transition: transform 0.5s var(--ease), border-color 0.5s, box-shadow 0.5s;
}

.post-item:hover {
  transform: translateY(-8px) rotate(0.8deg);
  border-color: var(--gold);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.post-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 1.6rem; }
.post-item .date {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.6rem;
}
.post-item h2 { font-size: 1.9rem; margin-bottom: 0.8rem; }
.post-item p { color: var(--ink-soft); margin-bottom: 1.2rem; }

/* ---------- TODO marker ---------- */

.todo {
  border: 1px dashed rgba(201, 169, 106, 0.55);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink-soft);
}
.todo::before { content: "✏️ TODO: "; font-style: normal; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding: 4.5rem 2.2rem 3.5rem;
  text-align: center;
}

.site-footer h3 { font-size: 1.6rem; margin-bottom: 0.4rem; color: var(--gold); }
.site-footer .mark { color: var(--gold); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2.6rem;
  flex-wrap: wrap;
  margin: 1.8rem 0 2.2rem;
}

.footer-links a {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s, color 0.3s;
}

.footer-links a:hover { opacity: 1; color: var(--gold); }

.site-footer .credit { font-size: 0.9rem; opacity: 0.55; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .word, .reveal { opacity: 1; transform: none; }
}

.site-title .logo-mark { width: 1.25em; height: 1.25em; vertical-align: -0.3em; margin-left: 0.2em; }
