/* --------------------------
   Color system
--------------------------- */
:root {
  --hm-bg: #ffffff;
  --hm-bg-tint: #f7f8f7;

  /* Palette */
  --hm-shadow-green: #92bebe;
  --hm-genoa: #167380;   /* teal */
  --hm-tussock: #b39142; /* warm orangy accent */
  --hm-ferra: #634f49;

  /* Typographic colors */
  --hm-text-main: #141414;
  --hm-text-muted: #5a5a5a;
  --hm-heading: #101010;

  /* UI colors */
  --hm-border-subtle: #e3e5e6;
  --hm-card-bg: #f3f3f3;

  /* Theme */
  --hm-primary: var(--hm-genoa);
  --hm-accent: var(--hm-tussock);

  /* Fonts */
  --font-heading: "Red Hat Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: "Funnel Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-alt: "Quicksand", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --------------------------
  Corners
--------------------------- */

:root {
  --hm-radius-large: 18px;
  --hm-radius-medium: 14px;
  --hm-radius-small: 10px;
}

/* Remove accidental gap above hero band */
.site-header {
  margin-bottom: 0;
}

.hero.hero-band {
  margin-top: 0;
  padding-top: 0;
}


/* --------------------------
   Base reset
--------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--hm-bg);
  color: var(--hm-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


/* --- HERO BAND --- */

.hero-band {
  padding: 0;
  margin: 0;
}

.hero-band-image {
  width: 100%;
  height: 220px;            /* adjust to taste: 160–260px looks best */
  overflow: hidden;
}

.hero-band-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;   /* adjust if needed */
  display: block;
}

/* Space between image and text */
.hero-content {
  padding-top: 3rem;
  padding-bottom: 1.6rem;   /* was 3rem */
}


/* Typography stays as you defined earlier */

/* HERO BAND LAYOUT ---------------------------------- */

.hero-band {
  padding: 0;
  margin: 0 0 3rem;
}

.hero-band-image {
  width: 100%;
  height: 220px;          /* tweak to taste: 160–260px works well */
  overflow: hidden;
  position: relative;
}

.hero-band-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Optional soft fade into page background */
.hero-band-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 90%
  );
}

.hero-content {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* HERO TITLE DYNAMIC WORD --------------------------- */

.hero-title-main {
  color: var(--hm-accent);      /* make "Human Sounds" orange; remove if you don't like it */
}

.hero-title-line2 {
  display: inline-block;
}

.hero-dynamic-word {
  color: var(--hm-accent);
  display: inline-block;
  transition: opacity 0.22s ease-out, transform 0.22s ease-out;
}

/* states used by JS for smooth swap */
.hero-word-out {
  opacity: 0;
  transform: translateY(0.4em);
}

.hero-word-in {
  opacity: 1;
  transform: translateY(0);
}



/* --------------------------
   Layout helpers
--------------------------- */

.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.section {
  padding: 1.5rem 0;
}

.section-tinted {
  background-color: var(--hm-bg-tint);
}

.section-header {
  max-width: 40rem;
  margin-bottom: 1.0rem;
}

.section-header h2 {
  margin: 0 0 0.35rem;
  color: var(--hm-heading);
}

.section-header p {
  margin: 0;
  color: var(--hm-text-muted);
}

/* --------------------------
   Typography
--------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--hm-heading);
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.03;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1rem;
  font-size: 0.98rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--hm-text-muted);
  font-family: var(--font-ui);
}

.hero-text {
  font-size: 1.02rem;
  max-width: 32rem;
  color: var(--hm-text-muted);
}

/* --------------------------
   Header / nav
--------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--hm-bg);
  border-bottom: 1px solid var(--hm-border-subtle);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.86rem;
  text-decoration: none;
  color: var(--hm-heading);
}

.main-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.95rem;
  font-family: var(--font-ui);
}

.main-nav a {
  text-decoration: none;
  color: var(--hm-text-muted);
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: var(--hm-accent);
  transition: width 160ms ease-out;
}

.main-nav a:hover {
  color: var(--hm-accent);
}

.main-nav a:hover::after {
  width: 100%;
}

/* --------------------------
   Buttons – now orange accent
--------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-ui);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 120ms ease-out,
    border-color 120ms ease-out, color 120ms ease-out;
  white-space: nowrap;
}

.btn.primary {
  background-color: var(--hm-accent);
  color: #ffffff;
}

.btn.primary:hover {
  transform: translateY(-1px);
  background-color: #946f2f; /* slightly darker */
}

.btn.ghost {
  background-color: transparent;
  border-color: var(--hm-accent);
  color: var(--hm-accent);
}

.btn.ghost:hover {
  background-color: rgba(179, 145, 66, 0.07);
}

/* --------------------------
   Hero (image tile)
--------------------------- */

.hero {
  padding: 4.2rem 0 4.6rem;
}

.hero-grid {
  display: grid;
  gap: 2.3rem;
  align-items: center;
}

.hero-title {
  text-transform: none;
  font-size: clamp(2.4rem, 5.8vw, 3.8rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-media {
  width: min(380px, 70vw);
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
}

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

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

.two-column {
  display: grid;
  gap: 1.5rem;
}

.about-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.7rem;
  font-size: 0.88rem;
}

.about-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--hm-accent);
  font-weight: 600;
  font-family: var(--font-ui);
}

.about-link::before {
  content: "→";
  font-size: 0.85rem;
  display: inline-block;
  transform: translateX(0);
  transition: transform 140ms ease-out, color 140ms ease-out;
  color: var(--hm-primary);
}

.about-link:hover {
  color: var(--hm-primary);
}

.about-link:hover::before {
  transform: translateX(4px);
}

/* BIG PROJECT CARDS
   1 per row mobile, 2 on tablet, 3–4 on large screens
*/
.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 720px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .projects-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.project-card {
  background-color: var(--hm-card-bg);
  border-radius: var(--hm-radius-large);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* image runs to edges of the card */
.project-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

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

/* padded text area inside card */
.project-body {
  padding: 1.4rem 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--font-ui);
}

.project-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hm-text-muted);
}

.project-pill {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #111;
  background-color: transparent;
}

.project-title {
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0;
}

/* clickable orange title + arrow, similar to Substack style */
.project-title-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--hm-accent);
  font-family: var(--font-heading);
}

.project-title-link:hover {
  color: var(--hm-primary);
}

.project-title-arrow {
  font-size: 0.9rem;
  transform: translateX(0);
  transition: transform 140ms ease-out;
}

.project-title-link:hover .project-title-arrow {
  transform: translateX(4px);
}

.project-text {
  font-size: 0.96rem;
  color: var(--hm-text-muted);
}

/* old bottom .project-link not needed anymore, but keeping here in case anything still references it */
.project-link {
  display: none;
}



/* MINI PROJECT GRID – square icon + title + arrow */
.project-mini-wrapper {
  margin-top: 3rem;
}

.project-mini-heading {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

/* Auto-fit; can go up to ~8 per row on wide screens */
.project-mini-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.project-mini-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  background-color: #f7f7f7;
  border: 1px solid #e3e5e6;
  text-decoration: none;
  color: var(--hm-heading);
}

.project-mini-card:hover {
  border-color: var(--hm-accent);
}

.mini-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

/* Placeholder gradient “icons” – replace with real images via background-image if you want */
.mini-thumb-data-grave {
  background-image: linear-gradient(135deg, #171717, #444);
}

.mini-thumb-ghost-radio {
  background-image: linear-gradient(135deg, #92bebe, #ffffff);
}

.mini-thumb-shaper {
  background-image: linear-gradient(135deg, #634f49, #f5e7de);
}

.mini-thumb-microloops {
  background-image: linear-gradient(135deg, #167380, #f5f5f5);
}

.mini-thumb-random-gene {
  background-image: linear-gradient(135deg, #b39142, #f7f3e5);
}

.mini-thumb-ghost-notes {
  background-image: linear-gradient(135deg, #d8e2ff, #ffffff);
}

.mini-thumb-signal-field {
  background-image: linear-gradient(135deg, #c9ffe0, #f5ffff);
}

.mini-thumb-phase-study {
  background-image: linear-gradient(135deg, #f0c2ff, #ffffff);
}

.mini-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mini-title {
  font-size: 0.88rem;
  font-weight: 600;
}

.mini-arrow {
  font-size: 0.9rem;
  color: var(--hm-accent);
  transition: transform 140ms ease-out;
}

.project-mini-card:hover .mini-arrow {
  transform: translateX(3px);
}

/* Mini project card sizing */
.project-mini-card {
  max-width: 180px;      /* keeps cards compact on large screens */
}

.mini-thumb {
  width: 100%;
  max-width: 180px;      /* hard cap */
  max-height: 180px;     /* hard cap */
  aspect-ratio: 1 / 1;
  border-radius: var(--hm-radius-medium);
  overflow: hidden;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  /* safety limit: even if the original file is huge, it won’t break layout */
  max-width: 180px;
  max-height: 180px;
}


/* --------------------------
   Store / CTA
--------------------------- */

.store-grid {
  display: grid;
  gap: 1.6rem;
  align-items: center;
}

.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

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

.site-footer {
  border-top: 1px solid var(--hm-border-subtle);
  padding: 1.6rem 0 2.2rem;
  background-color: #ffffff;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--hm-text-muted);
}

.footer-meta {
  opacity: 0.8;
}

/* --------------------------
   Responsive tweaks
--------------------------- */

@media (min-width: 720px) {
  .hero {
    padding: 4.8rem 0 5.2rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .header-inner {
    gap: 1rem;
  }

  .main-nav {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .logo {
    letter-spacing: 0.16em;
  }

  .hero-grid {
    gap: 2.4rem;
  }

  .hero-media {
    width: 100%;
  }
}

.footer-kofi {
  color: var(--hm-accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-kofi:hover {
  color: var(--hm-primary);
}

/* Substack list */
.notes-intro {
  color: #444;
  margin-bottom: 1rem;
}

.substack-list {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.substack-post {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.8rem;
}

/* Small square image in front of each article */
.substack-image {
  width: 90px !important;
  height: 90px !important;
  object-fit: cover;
  border-radius: var(--hm-radius-small);
  flex-shrink: 0;
}

/* Placeholder square when an article has no image */
.substack-placeholder {
  background: linear-gradient(135deg, var(--hm-accent), #f7f3e5);
}

/* Content next to the thumbnail */
.substack-content {
  flex: 1;
}

.substack-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

/* Use site theme colors for links */
.substack-title a {
  text-decoration: none;
  color: var(--hm-accent);
  font-weight: 600;
}

.substack-title a:hover {
  color: var(--hm-primary);
  text-decoration: underline;
}

.substack-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  display: block;
}

.substack-snippet {
  color: #333;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
}

/* Mobile layout */
@media (max-width: 420px) {
  .substack-post {
    flex-direction: column;
  }

  .substack-image {
    width: 100% !important;
    height: 180px !important;
  }
}

