@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;1,9..144,400&family=Inter:wght@400;500&display=swap');

:root {
  --bg: #FAF8F4;
  --ink: #2A2825;
  --taupe: #8A8578;
  --taupe-light: #A8A296;
  --rule: #E4E0D8;
  --green: #7FA98A;
  --green-deep: #5E8A6C;
  --green-soft: #EAF1EA;
  --max-width: 640px;
}

:root[data-theme="dark"] {
  --bg: #171614;
  --ink: #ECE8E0;
  --taupe: #948E82;
  --taupe-light: #746F66;
  --rule: #302D28;
  --green: #8FBF9C;
  --green-deep: #A9D3B4;
  --green-soft: #212B24;
}

html {
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

header.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 3.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 0.5px solid var(--rule);
}

header.masthead a.name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

header.masthead a.name .site-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

header.masthead a.name:hover {
  color: var(--green-deep);
}

nav.masthead-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav.masthead-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--taupe);
  text-decoration: none;
  transition: color 0.15s ease;
}

nav.masthead-nav a:hover {
  color: var(--ink);
}

nav.masthead-nav a.active {
  color: var(--green-deep);
}

.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: var(--taupe);
  transition: color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--green-deep);
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.entry {
  display: block;
  text-decoration: none;
  color: inherit;
}

.entry .date,
.project-entry .date {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--taupe-light);
  margin: 0 0 5px;
}

.entry h2,
.project-entry h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 5px;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.entry:hover h2 {
  color: var(--green-deep);
}

.entry p.desc,
.project-entry p.desc {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--taupe);
  margin: 0;
  line-height: 1.65;
}

.project-links {
  margin: 8px 0 0;
  display: flex;
  gap: 14px;
}

.project-links a {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--green-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--green);
  transition: color 0.15s ease;
}

.project-links a:hover {
  color: var(--ink);
}

/* About page */
.about .headshot {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 0 1.75rem;
}

.about h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 1.5rem;
}

/* Photos embedded in posts */
.post-photo {
  display: block;
  width: 100%;
  border-radius: 8px;
  margin: 1.75rem 0;
}

/* Post / article page */
.post {
  max-width: 620px;
}

.post-back {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--taupe);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.15s ease;
}

.post-back:hover {
  color: var(--green-deep);
}

.post > .date {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--taupe-light);
  margin: 0 0 10px;
}

.post h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.post .dek {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--taupe);
  margin: 0 0 2.5rem;
}

.post-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}

.post-body p {
  margin: 0 0 1.35rem;
}

.post-body h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.3;
  color: var(--ink);
  margin: 2.5rem 0 0.9rem;
}

.post-body a {
  color: var(--green-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--green);
  transition: color 0.15s ease;
}

.post-body a:hover {
  color: var(--ink);
}

.post-body ol,
.post-body ul {
  margin: 0 0 1.35rem;
  padding-left: 1.25rem;
}

.post-body li {
  margin: 0 0 0.6rem;
  padding-left: 0.35rem;
}

.post-body blockquote {
  margin: 2rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--green);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--taupe);
}

/* Product row — alternating image / text */
.wrap.post-wide {
  max-width: 820px;
}

.product-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 0.5px solid var(--rule);
}

.product-row:last-child {
  border-bottom: 0.5px solid var(--rule);
}

.product-row.flip {
  grid-template-columns: 1fr 260px;
}

.product-row.flip .product-img {
  order: 2;
}

.product-row.flip .product-text {
  order: 1;
}

.product-img img {
  display: block;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.product-text .product-num {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 6px;
}

.product-text h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.product-text h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--green);
  transition: color 0.15s ease;
}

.product-text h2 a:hover {
  color: var(--green-deep);
}

.product-text p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--taupe);
  margin: 0;
}

@media (max-width: 600px) {
  .wrap.post-wide {
    max-width: var(--max-width);
  }
  .product-row,
  .product-row.flip {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .product-row.flip .product-img,
  .product-row.flip .product-text {
    order: unset;
  }
  .product-img img {
    max-width: 220px;
  }
}

.about p {
  margin: 0 0 1.25rem;
  font-size: 15.5px;
  color: #4A473F;
}

.about .signature-line {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--green-deep);
  margin-top: 2rem;
}

/* Home layout — bio + now sidebar */
.wrap.home {
  max-width: 960px;
}

.home-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

/* Now section */
.now {
  position: sticky;
  top: 3rem;
  padding: 1.5rem 1.5rem 1.75rem;
  border: 0.5px solid var(--rule);
  border-radius: 14px;
  background: var(--green-soft);
}

.now-intro {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--green-deep);
  margin: 0 0 0.4rem;
}

.now-updated {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 1.5rem;
}

.now-date {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  color: var(--green-deep);
  border-bottom: 1px solid var(--green);
  padding-bottom: 1px;
}

.now-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.now-item {
  margin: 0;
}

.now-item .now-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--green);
  margin: 0 0 3px;
}

.now-item .now-value {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}

.now-item .now-value a.now-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--green);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.now-item .now-value a.now-link:hover {
  color: var(--green-deep);
  border-color: var(--green-deep);
}

.now-item .now-preview {
  display: inline-block;
  margin-top: 8px;
}

.now-item .now-preview img {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 0.5px solid var(--rule);
  background: #fff;
  transition: opacity 0.15s ease;
}

.now-item .now-preview:hover img {
  opacity: 0.85;
}

.spotify-embed iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
}

.links {
  display: flex;
  gap: 16px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--rule);
}

.links a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--taupe);
  text-decoration: none;
  transition: color 0.15s ease;
}

.links a:hover {
  color: var(--green-deep);
}

footer.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--rule);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--taupe-light);
}

@media (max-width: 480px) {
  .wrap {
    padding: 2.5rem 1.25rem 4rem;
  }
  header.masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .now {
    position: static;
  }
}
