/* Eleventy pages — layout only; typography comes from ui-preset-* classes in styles.css */

/* Early paint — legacy styles.css sets --token-a65aeb92 to #fff before Kami loads */
html,
body,
#main,
.ui-lN5SP[data-layout-template="true"],
.site-content {
  background-color: #f5f4ed;
}

body {
  --token-a65aeb92-d759-4a39-b772-8775ba6f096c: #f5f4ed;
}

html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] #main,
html[data-theme="light"] .ui-lN5SP[data-layout-template="true"],
html[data-theme="light"] .site-content {
  background-color: #f5f4ed;
}

html[data-theme="light"] body {
  --token-a65aeb92-d759-4a39-b772-8775ba6f096c: #f5f4ed;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] #main,
html[data-theme="dark"] .ui-lN5SP[data-layout-template="true"],
html[data-theme="dark"] .site-content {
  background-color: #141413;
}

html[data-theme="dark"] body {
  --token-a65aeb92-d759-4a39-b772-8775ba6f096c: #141413;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]),
  html:not([data-theme="light"]) body,
  html:not([data-theme="light"]) #main,
  html:not([data-theme="light"]) .ui-lN5SP[data-layout-template="true"],
  html:not([data-theme="light"]) .site-content {
    background-color: #141413;
  }

  html:not([data-theme="light"]) body {
    --token-a65aeb92-d759-4a39-b772-8775ba6f096c: #141413;
  }
}

html, body {
  min-height: 100vh;
}

html {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ui-lN5SP[data-layout-template="true"] {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  height: auto;
  width: 100%;
  padding: 0;
}

.ui-lN5SP[data-layout-template="true"] > .site-content {
  flex: 1 1 auto;
}

:root body {
  background-color: #f5f4ed;
}

.ui-lN5SP .site-content {
  --site-border: color-mix(
    in srgb,
    var(--token-a5aa483f-4f79-4648-a71d-783f09603577, #ababab) 45%,
    transparent
  );
  --site-surface: color-mix(
    in srgb,
    var(--token-dc11ae94-e5e0-46b4-a7bb-6a89927d0b69, #0a0a0a) 4%,
    transparent
  );
  width: 100%;
  max-width: var(--page-width, 900px);
  margin: 0 auto;
  padding: 0 16px 0;
}

.site-content > .ui-iNQ6I > .page-header {
  width: 100%;
  text-align: left;
}

.site-content:not(.contact-page) > .ui-iNQ6I {
  padding-top: 24px;
}

.site-content:not(.contact-page) > .ui-iNQ6I:has(.page-header) {
  padding-top: 0;
}

.site-content #about .ui-1xj1hw9 {
  padding: 0 0 60px;
}

.site-content #about .ui-1lkei78 {
  align-items: flex-start;
  place-content: flex-start;
  width: 100%;
}

.site-muted {
  --ui-text-color: var(--token-66a88aa6-8fc9-447d-b229-c1bafaea57af, #595959);
  color: var(--token-66a88aa6-8fc9-447d-b229-c1bafaea57af, #595959);
}

.ui-lN5SP .ui-CyFQx.ui-17eehuw,
.ui-lN5SP .ui-CyFQx.ui-v-17eehuw {
  width: max-content;
  max-width: calc(100vw - 48px);
}

.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4 .site-nav-prefix {
  text-decoration: none;
}

.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[aria-current="page"],
.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[data-site-page-link-current] {
  background: none !important;
  background-color: transparent !important;
  border-radius: 0;
  padding: 0;
  color: var(--token-dc11ae94-e5e0-46b4-a7bb-6a89927d0b69, #0a0a0a);
  text-decoration: none;
}

.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[aria-current="page"] .site-nav-label,
.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[data-site-page-link-current] .site-nav-label {
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-text-decoration-line: underline;
  text-decoration-line: underline;
}

.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[aria-current="page"]:hover,
.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[data-site-page-link-current]:hover {
  text-decoration: none;
}

.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[aria-current="page"]:hover .site-nav-label,
.ui-lN5SP .ui-CyFQx a.ui-preset-1g7mae4[data-site-page-link-current]:hover .site-nav-label {
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-text-decoration-line: underline;
  text-decoration-line: underline;
}

.site-content a.post-item,
.site-content a.work-item,
.site-content a.ui-0knC4 {
  text-decoration: none;
  color: inherit;
}

.site-content a.post-item:hover,
.site-content a.work-item:hover,
.site-content a.ui-0knC4:hover {
  text-decoration: none;
}

.site-footer {
  width: 100%;
  max-width: var(--page-width, 900px);
  margin: 0 auto;
  margin-top: auto;
  padding: 0 16px;
  flex-shrink: 0;
}

.site-footer .site-credit {
  border-top: 1px solid var(--site-border, rgba(0, 0, 0, 0.08));
  margin: 0;
  padding: 24px 0 0;
  text-align: center;
  line-height: 1.5;
}

.page-header {
  margin-bottom: 0;
}

.page-header-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header-with-actions h1 {
  margin-bottom: 0;
}

.page-header-actions {
  flex-shrink: 0;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  line-height: 1.6;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: grid;
  grid-template-columns: minmax(140px, calc((var(--page-width, 900px) - 16px) / 2)) 1fr;
  gap: 16px;
  padding: 32px 0;
  border-top: 1px solid var(--site-border);
  transition: opacity 0.15s;
  color: inherit;
  align-items: start;
}

.post-item:hover {
  opacity: 0.8;
}

.post-item:last-child {
  border-bottom: 1px solid var(--site-border);
}

.post-body .post-title,
.post-body h2,
.post-body h3 {
  margin-bottom: 8px;
}

.post-excerpt {
  line-height: 1.65;
}

.post-meta {
  margin-bottom: 8px;
}

.post-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.post-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background-color: #faf9f5;
  border: 1px solid var(--token-daafa54d-7b22-4a97-bd53-87b12775dffd, #ebebeb);
  object-fit: cover;
  display: block;
}

.post-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--token-66a88aa6-8fc9-447d-b229-c1bafaea57af, #595959);
}

#work-page .post-list,
#playground-page .post-list,
#blog-page .blog-feed {
  margin-top: 0;
}

.project-hero {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 28px;
  border: 1px solid var(--site-border);
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 20px 0;
  margin-bottom: 28px;
  border-top: 1px solid var(--site-border);
  border-bottom: 1px solid var(--site-border);
}

.project-meta-label {
  margin-bottom: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--token-dc11ae94-e5e0-46b4-a7bb-6a89927d0b69, #0a0a0a);
  color: var(--token-a65aeb92-d759-4a39-b772-8775ba6f096c, #fff);
  border-radius: 8px;
  margin-top: 24px;
  transition: opacity 0.15s;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.88;
  text-decoration: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.gallery img {
  border-radius: 8px;
  border: 1px solid var(--site-border);
}

.prose {
  line-height: 1.75;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose h2 {
  margin: 36px 0 14px;
}

.prose a {
  text-underline-offset: 3px;
}

.back-link-wrap {
  margin-top: 48px;
}

@media (max-width: 768px) {
  .post-item {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transform: none !important;
  }
}

/* Contact page — business card */
.site-content.contact-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: center;
  padding-bottom: 0;
}

.contact-page .ui-iNQ6I {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0;
}

#main:has(.contact-page-layout) > .site-footer {
  max-width: none;
  margin-top: 0;
  padding: 8px;
}

@media (max-width: 540px) {
  .contact-page .ui-iNQ6I {
    justify-content: center;
    padding: 0;
  }

  #main:has(.contact-page-layout) > .site-footer {
    padding: 8px;
  }
}
