/* Taheri Lab: an organic background and banner for the Greene template.
   This file is discovered automatically by _includes/styles.html. */

:root {
  --lab-paper: 250, 249, 249;
  --lab-panel: 255, 255, 255;
  --lab-panel-alt: 246, 243, 245;
  --lab-ink: 127, 91, 105;
  --lab-accent: #8d495c;
  --primary: #8d495c;
}

html[data-dark="true"] {
  --lab-paper: 24, 22, 26;
  --lab-panel: 29, 27, 31;
  --lab-panel-alt: 35, 30, 35;
  --lab-ink: 194, 163, 175;
  --lab-accent: #d49aa9;
  --primary: #d49aa9;
}

body {
  isolation: isolate;
  background: rgb(var(--lab-paper));
  line-height: 1.65;
}

#lab-ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Translucent sections let the ambient illustration remain visible.
   Images, paragraphs and controls themselves stay fully opaque. */
main > section:nth-of-type(odd) {
  background: rgba(var(--lab-panel), 0.78);
}

main > section:nth-of-type(even) {
  background: rgba(var(--lab-panel-alt), 0.76);
}

header.background {
  --image: url("../images/taheri-banner.png") !important;
}

/* The light hero illustration is used only for the homepage banner. */
footer.background {
  --image: none !important;
}

header.background {
  --text: #ffffff;
  --primary: #efc7ce;
  background: #292929;
  color: #ffffff;
  box-shadow: 0 5px 28px rgba(34, 21, 29, 0.09);
}

header.background::before {
  background-image: none;
  opacity: 1;
}

/* Hide the Greene template's placeholder flask. The home link remains. */
header .logo {
  display: none;
}

/* The title and navigation use the quiet left half of the illustration.
   Contain preserves the whole cell and all three data layers at any width. */
header[data-big] {
  --text: #25242a;
  --primary: #874256;
  color: var(--text);
  background: #f3f2f5;
  box-sizing: border-box;
  min-height: clamp(400px, calc(100vw / 3 + 36px), 720px);
  padding: clamp(40px, 5vw, 96px) clamp(24px, 6vw, 120px);
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  border-radius: 0 0 32px 32px;
  overflow: hidden;
}

header[data-big]::before {
  inset: 16px 0;
  background-image: var(--image);
  background-size: contain;
  background-position: right center;
  background-repeat: no-repeat;
  border-radius: inherit;
}

header[data-big] .home {
  flex: 0 0 auto;
  align-items: flex-start;
  width: 44%;
  max-width: 660px;
}

header[data-big] .title-text {
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 14px;
  width: 100%;
  text-align: left;
}

header[data-big] .title {
  font-size: clamp(2.25rem, 4vw, 4.5rem);
  font-weight: 600;
  line-height: 1.12;
}

header[data-big] .subtitle {
  color: #4d4b54;
  opacity: 1;
  max-width: 30ch;
  font-size: clamp(1rem, 1.4vw, 1.375rem);
  line-height: 1.5;
}

header[data-big] nav {
  justify-content: flex-start;
  width: 44%;
  max-width: 660px;
  gap: 6px 8px;
  margin-left: -10px;
}

header[data-big] .title,
header[data-big] .subtitle,
header[data-big] nav {
  text-shadow: none;
}

header[data-big] nav > a:hover {
  background: rgba(135, 66, 86, 0.07);
}

header[data-big] nav > a:focus-visible {
  outline-color: var(--primary);
}

header .title,
header .subtitle,
header nav {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

header .subtitle {
  opacity: 0.94;
}

header nav {
  text-transform: none;
  gap: 12px;
}

header nav > a {
  border-radius: 8px;
  padding: 8px 10px;
}

header nav > a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.feature {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(var(--lab-ink), 0.1);
  border-radius: 24px;
  background: rgba(var(--lab-panel), 0.8);
  box-shadow: 0 8px 32px rgba(44, 27, 35, 0.035);
}

.feature-image {
  border-radius: 18px;
  box-shadow: none;
}

.lab-motion-toggle {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 30;
  box-sizing: border-box;
  max-width: calc(100vw - 96px);
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid rgba(var(--lab-ink), 0.24);
  border-radius: 999px;
  background: rgba(var(--lab-panel), 0.96);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(34, 21, 29, 0.07);
}

.lab-motion-toggle[aria-checked="true"] {
  border-color: var(--lab-accent);
}

.lab-motion-toggle:hover {
  background: rgb(var(--lab-panel));
}

.lab-motion-toggle:focus-visible {
  outline: 3px solid var(--lab-accent);
  outline-offset: 3px;
}

/* On narrow screens, the art occupies its own area BELOW the text.
   Only the illustration's empty left margin extends outside this area. */
@media (max-width: 800px) {
  header[data-big] {
    --lab-art-height: clamp(180px, 56vw, 440px);
    min-height: 0;
    padding: 40px 24px calc(var(--lab-art-height) + 44px);
    gap: 24px;
    border-radius: 0 0 22px 22px;
  }

  header[data-big]::before {
    inset: auto 0 20px;
    height: var(--lab-art-height);
    background-size: 160% auto;
    background-position: right center;
  }

  header[data-big] .home,
  header[data-big] nav {
    width: 100%;
    max-width: none;
  }

  header[data-big] .title {
    font-size: clamp(2.25rem, 6vw, 3.25rem);
  }

  header[data-big] .subtitle {
    font-size: 1rem;
  }

}

@media (max-width: 700px) {
  .feature {
    gap: 22px;
    border-radius: 18px;
  }
}

@media print {
  #lab-ambient-canvas,
  .lab-motion-toggle {
    display: none !important;
  }
}
/* Hide the default flask logo */
header .logo {
  display: none !important;
}
/* Increase text size throughout the website */
html {
  font-size: 125%;
}
