@import "../../shared/fancy-base.css";

:root {
  --bg: #ffffff;
  --bg-2: #f9f9f7;
  --surface: #f9f8f0;
  --surface-strong: #f0e870;
  --border: #e0ddd5;
  --text: #111111;
  --text-muted: #555555;
  --text-soft: #999999;
  --accent: #a08800;
  --accent-2: #b89e00;
  --accent-3: #111111;
  --accent-text: #111111;
  --font: "IBM Plex Mono", "Courier New", monospace;
  --font-display: "Inter", system-ui, sans-serif;
  --max-w: 640px;
  --content-w: 560px;
  --radius: 2px;
  --radius-sm: 2px;
  --header-h: 90px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

/* ── Header ── */
.site-header {
  position: static;
  background: var(--bg);
  border-bottom: none;
  height: auto;
  padding: 2rem 0 0;
}

.header-inner {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

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

.header-brand {
  gap: 0.75rem;
  align-items: center;
}

.header-headshot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  box-shadow: none;
}

.header-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-site-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
}

.header-tagline {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.header-nav {
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 400;
  text-decoration: none;
  padding: 0;
  background: none;
}

.header-nav a + a {
  margin-left: 0.55rem;
  padding-left: 0.8rem;
  position: relative;
}

.header-nav a + a::before {
  content: "|";
  position: absolute;
  left: 0;
  color: var(--text-soft);
}

.header-nav a:hover {
  background: none;
  color: #353535;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  font-weight: 400;
}

.header-nav a.nav-active {
  background: none;
  color: #353535;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  font-weight: 400;
}

.header-cta {
  display: none;
}

.hamburger,
.mobile-nav {
  display: none !important;
}

/* ── Hero ── */
.hero {
  padding: 2.9rem 0 1.5rem;
  max-width: none;
  border: none;
  background: none;
}

.page-start > .hero:first-child {
  padding-top: 2.9rem;
}

.page-content,
.post-content {
  padding-top: 2.6rem;
}

.page-start > .prose {
  padding-top: 2.1rem;
}

.hero .home-hero {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.hero .hero-copy {
  order: 1;
  max-width: var(--content-w);
}

.hero .hero-media {
  display: none;
}

.hero .hero-media-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.hero .hero-media-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-transform: none;
  text-wrap: balance;
}

.hero__title a,
.hero__title strong,
.hero__title b {
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  font-weight: 400;
  color: #353535;
}

.hero-body,
.hero__body {
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.72;
  color: var(--text-muted);
  max-width: var(--content-w);
}

.hero-body p,
.hero__body p {
  margin-bottom: 1rem;
}

.hero-body p:has(> a:only-child),
.hero__body p:has(> a:only-child) {
  margin: 1.1rem 0;
}

.hero-body a,
.hero__body a {
  color: #353535;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  font-weight: 400;
}

.hero-body p:has(> a:only-child) a,
.hero__body p:has(> a:only-child) a {
  display: inline-block;
  background: var(--surface-strong);
  border: 1px solid #c8b830;
  border-radius: 3px;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
}

.hero-body p:has(> a:only-child) a:hover,
.hero__body p:has(> a:only-child) a:hover {
  background: #e0d448;
  color: var(--text);
}

/* Yellow pill list items in hero */
.hero-body ul,
.hero__body ul {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 1rem;
}

.hero-body li,
.hero__body li {
  margin-bottom: 0.6rem;
  font-size: 0.86rem;
}

.hero-body li a,
.hero__body li a {
  display: inline;
  background: var(--surface-strong);
  padding: 0.3rem 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.86rem;
  line-height: 1.5;
}

.hero-body li a:hover,
.hero__body li a:hover {
  background: #e0d448;
  color: var(--text);
}

.button.primary {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid #c8b830;
  border-radius: 3px;
  padding: 0.7rem 1.25rem;
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  display: inline-block;
}

.button.primary:hover {
  background: #e0d448;
  transform: none;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.7rem 1.25rem;
  font-family: var(--font);
  font-size: 0.86rem;
}

/* ── Posts Section ── */
.homepage-posts {
  padding: 0 0 3rem;
  max-width: var(--content-w);
}

.homepage-posts .section-heading h2 {
  display: none;
}

.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--content-w);
  margin: 0;
}

.feature-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
}

.feature-media,
.feature-image-container {
  display: none !important;
}

.feature-content {
  padding: 0;
  flex-grow: 1;
}

.feature-date {
  display: none;
}

.feature-content h3 {
  font-family: var(--font);
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0;
  font-family: var(--font);
}

.feature-content h3 a {
  color: var(--text);
  display: inline-block;
  background: var(--surface-strong);
  padding: 0.3rem 0.6rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.feature-content h3 a:hover {
  background: #e0d448;
}

.feature-content p {
  display: none;
}

.feature-link {
  display: none;
}

.content-body a,
.post-body a,
.prose a,
.footer-recent-title a {
  color: #353535;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  font-weight: 400;
}

.content-body a:hover,
.post-body a:hover,
.prose a:hover,
.footer-recent-title a:hover {
  color: var(--text);
}

/* ── Theme 4 archive pages ── */
.page-start {
  display: flex;
  flex-direction: column;
}

.page-start .category-bar {
  order: -1;
  margin: 0 0 1.7rem;
}

.page-start > .sidebar-section {
  display: none;
}

.content-shell.section {
  display: flex;
  flex-direction: column;
}

.content-shell.section > .filter-bar {
  order: -1;
  margin: 0 0 1.7rem;
}

.content-shell.section > .section-heading {
  margin-bottom: 1.75rem;
}

.content-shell.section > .section-heading p {
  display: none;
}

.category-bar,
.filter-bar {
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.category-chip,
.filter-chip {
  padding: 0.34rem 0.8rem;
  border-radius: 0;
  border-color: #8e8b83;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 400;
}

.category-chip:hover,
.filter-chip:hover {
  border-color: var(--text);
  background: transparent;
}

.category-chip--active,
.filter-chip.active {
  border-color: #383838;
  background: #383838;
  color: #fff;
}

.category-chip--active:hover,
.filter-chip.active:hover {
  background: #383838;
  color: #fff;
}

.page-title,
.section-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.page-start .post-grid,
.page-start .post-grid--2col,
.content-shell .post-grid {
  display: block;
}

.page-start .post-card,
.content-shell .post-card {
  display: list-item;
  margin: 0 0 1.35rem 1.25rem;
  list-style: disc;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.page-start .post-card:hover,
.content-shell .post-card:hover {
  border: none;
  box-shadow: none;
  transform: none;
}

.page-start .post-card__image-wrap,
.content-shell .post-card__image-wrap,
.page-start .post-card__meta,
.content-shell .post-card__meta,
.page-start .post-card__excerpt,
.content-shell .post-card__excerpt {
  display: none;
}

.page-start .post-card__body,
.content-shell .post-card__body {
  padding: 0;
  display: block;
}

.page-start .post-card__title,
.content-shell .post-card__title {
  margin: 0;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.5;
}

.page-start .post-card__title a,
.content-shell .post-card__title a {
  color: #353535;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  font-weight: 400;
}

.page-start .post-card__title a:hover,
.content-shell .post-card__title a:hover {
  color: #443a1a;
}

/* ── Footer ── */
.site-footer {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  padding: 0 0 3rem;
  border-top: none;
  text-align: left;
  width: 100%;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem max(1.5rem, calc((100vw - var(--max-w)) / 2 + 1.5rem)) 0;
}

.footer-social-strip {
  background: transparent;
  border: none;
  margin: 0;
  padding: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  align-items: center;
}

.footer-social-strip a {
  color: var(--text);
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font);
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-social-strip a:hover {
  opacity: 1;
  color: #353535;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 400;
}

.footer-posts-col {
  width: 100%;
  margin-bottom: 1.9rem;
}

.footer-bottom {
  display: none;
}

.footer-nav {
  justify-content: flex-start;
  gap: 0;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  margin: 1.5rem 0 0;
  padding: 1.5rem max(1.5rem, calc((100vw - var(--max-w)) / 2 + 1.5rem)) 1.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.footer-nav a {
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  padding: 1px 5px;
}

.footer-nav a:hover {
  background: none;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  color: #353535;
  font-weight: 400;
}

.footer-nav a.nav-active {
  background: none;
  text-decoration: underline;
  text-decoration-color: #f0e870;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
  color: #353535;
  font-weight: 400;
}

/* manually add | separators between footer nav items */
.footer-nav a:not(:last-child)::after {
  content: " | ";
  background: none;
  padding: 0;
  color: var(--text-soft);
  margin: 0 0.1rem;
}

.footer-copyright {
  display: none;
}

.layout-with-sidebar {
  grid-template-columns: minmax(0, var(--content-w));
}

.layout-with-sidebar .sidebar {
  display: none;
}

.single-post-shell {
  --content-w: var(--max-w);
}

.single-post-shell .layout-with-sidebar {
  grid-template-columns: minmax(0, var(--max-w));
}

.single-post-shell .layout-with-sidebar > .prose,
.single-post-shell .prose,
.single-post-shell .article-header,
.single-post-shell .content-image {
  width: 100%;
  max-width: none;
}

.single-post-shell .layout-with-sidebar > .prose {
  padding-left: 0;
  padding-right: 0;
}

.article-meta {
  gap: 0.65rem;
  font-family: var(--font);
  font-size: 0.78rem;
}

.article-meta .article-category {
  background: var(--surface-strong);
  border: 1px solid #c8b830;
  border-radius: 3px;
  padding: 0.12rem 0.45rem;
  text-decoration: none;
}

/* ── Page / Post interiors ── */
.post-content,
.page-content {
  font-family: var(--font);
}

.content-body,
.post-body {
  font-family: var(--font);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .container,
  .header-inner {
    padding: 0 1.25rem;
  }

  .page-start > .hero:first-child {
    padding-top: 2.25rem;
  }

  .hero__title {
    font-size: 1.65rem;
  }

  .header-nav {
    display: flex;
    flex-wrap: wrap;
  }
}
