/* gianniphd personal website — layout, typography, kinetic timeline & components */

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--milk);
  color: var(--blazer);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

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

[data-theme="dark"] a {
  color: var(--milk);
}
[data-theme="dark"] a:hover {
  color: var(--mist);
}
[data-theme="dark"] a.link-highlight {
  color: var(--amber);
}
[data-theme="dark"] a.link-highlight:hover {
  color: var(--milk);
}

:focus-visible {
  outline: var(--stroke-focus) solid var(--focus);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--blazer);
  color: var(--milk);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Container & grounds */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.band {
  background: var(--surface);
  color: var(--ink);
  padding-block: var(--section-pad);
}

.band--flush {
  padding-block: 0;
}

.band--tight {
  padding-block: clamp(44px, 5vw, 68px);
}

.measure {
  max-width: var(--measure);
}

/* Typography helpers */
.t-display-xl {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 5.8vw, 80px);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}

.t-display-lg {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.8vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}

.t-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}

.t-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
}

.t-subtitle {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 650;
  font-variation-settings: "opsz" 24;
}

.t-lead {
  margin: 0;
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.5;
  font-weight: 400;
}

.t-body {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
}

.t-body-sm {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.t-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.18;
  font-variation-settings: "opsz" 48;
}

.t-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.t-data {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

.eyebrow {
  color: var(--accent);
}

.muted {
  color: var(--ink-muted);
}

/* Mark highlight */
.mark {
  background: var(--mark-bg);
  color: var(--mark-ink);
  padding: 0 0.16em;
  box-decoration-break: clone;
}

/* NameBlock */
.name-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.name-block__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.name-block__name span {
  display: block;
}

.name-block__credential {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  border: 2px solid var(--border);
  padding: 0.36em 0.72em 0.32em;
}

/* Buttons & Links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: var(--stroke-control) solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.btn--sm {
  min-height: 42px;
  padding: 8px 18px;
  font-size: 15px;
}

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--blazer);
}
.btn--primary:hover {
  background: var(--blazer);
  border-color: var(--blazer);
  color: var(--milk);
}

.btn--secondary {
  border-color: var(--border);
  color: var(--ink);
  background: transparent;
}
.btn--secondary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.btn--on-amber {
  border-color: var(--blazer);
  color: var(--blazer);
  background: transparent;
}
.btn--on-amber:hover {
  background: var(--blazer);
  color: var(--milk);
}

.btn--solid-ink {
  background: var(--blazer);
  border-color: var(--blazer);
  color: var(--milk);
}
.btn--solid-ink:hover {
  background: var(--blazer-deep);
  border-color: var(--blazer-deep);
  color: var(--milk);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 17px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 2px;
}
.link-arrow .arr {
  display: inline-block;
  transition: transform 120ms ease;
}
.link-arrow:hover .arr,
a:hover .arr {
  transform: translateX(3px);
}

/* Epistemic claim labels: Evidence / Experience / Interpretation */
.claim-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.34em 0.72em 0.3em;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}
.claim-badge__glyph {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  flex-shrink: 0;
}
.claim-badge--evidence {
  border: 2px solid var(--blazer);
  background: var(--blazer);
  color: var(--milk);
}
.claim-badge--evidence .claim-badge__glyph {
  background: var(--milk);
}
.claim-badge--experience {
  border: 2px solid var(--blazer);
  background: transparent;
  color: var(--blazer);
}
.claim-badge--experience .claim-badge__glyph {
  border-radius: 50%;
  background: var(--blazer);
}
.claim-badge--interpretation {
  border: 2px dashed var(--blazer);
  background: transparent;
  color: var(--blazer);
}
.claim-badge--interpretation .claim-badge__glyph {
  border-radius: 50%;
  border: 2px solid var(--blazer);
}

/* ==========================================================================
   MASTHEAD & MOBILE DRAWER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--milk);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}
.site-header__brand img {
  height: 30px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav__link {
  font-size: 16px;
  font-weight: 600;
  color: var(--blazer);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav__link:hover {
  border-bottom-color: var(--blazer);
}
.site-nav__link[aria-current="page"] {
  border-bottom-color: var(--brick);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--slate);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--blazer);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle:hover {
  border-color: var(--blazer);
  background: var(--parchment);
}

.mobile-drawer {
  display: none;
  background: var(--milk);
  border-bottom: 1px solid var(--rule);
  padding: 16px var(--gutter) 24px;
}
.mobile-drawer.is-open {
  display: block;
}
.mobile-drawer__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-drawer__link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 650;
  color: var(--blazer);
  text-decoration: none;
}
.mobile-drawer__link[aria-current="page"] {
  color: var(--brick);
}
.mobile-drawer__cta {
  margin-top: 16px;
}

@media (max-width: 820px) {
  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* ==========================================================================
   SPLIT HERO (Flush square photography beside solid ground)
   ========================================================================== */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.hero-split__copy-wrap {
  display: flex;
  justify-content: flex-end;
}

.hero-split__copy {
  width: 100%;
  max-width: 740px;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 4vw, 56px) clamp(48px, 6vw, 76px) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.hero-split__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-split__media {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  background: var(--parchment);
}

.hero-split__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.hero-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

@media (max-width: 920px) {
  .hero-split {
    grid-template-columns: 1fr;
  }
  .hero-split__copy-wrap {
    justify-content: flex-start;
  }
  .hero-split__copy {
    max-width: none;
    padding: 48px var(--gutter) 44px;
  }
  .hero-split__media {
    min-height: 440px;
  }
}

/* ==========================================================================
   FLUSH HAIRLINE GRIDS (Zero gutters, crisp 1px architectural seams)
   ========================================================================== */
.hairline-grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

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

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

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

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

.hairline-cell {
  background: var(--surface-raised);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hairline-cell--milk {
  background: var(--milk);
}

.hairline-cell--parchment {
  background: var(--parchment);
}

.hairline-cell__footer {
  margin-top: auto;
  padding-top: 8px;
}

@media (max-width: 1020px) {
  .hairline-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hairline-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .hairline-grid--3,
  .hairline-grid--2,
  .hairline-grid--4,
  .hairline-grid--5 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   KINETIC TRICHOME FIELD JOURNEY TIMELINE (Compact Viewport-Unified Centrepiece)
   ========================================================================== */
.journey-band {
  padding-block: clamp(44px, 5vw, 68px);
}

.journey-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
}

.journey-controls {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--slate);
  background: transparent;
  color: var(--blazer);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.chip--compact {
  min-height: 36px;
  padding: 5px 11px;
  font-size: 11.5px;
}

.chip:hover {
  border-color: var(--blazer);
  background: var(--parchment);
}

.chip[aria-pressed="true"] {
  background: var(--blazer);
  border-color: var(--blazer);
  color: var(--milk);
}

.journey-step-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.step-btn {
  min-height: 36px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--slate);
  background: transparent;
  color: var(--blazer);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.step-btn:hover {
  background: var(--blazer);
  border-color: var(--blazer);
  color: var(--milk);
}

/* Interactive Compact Botanical Trichome Skyline (184px stage + 50px ticks = 234px total) */
.skyline-shell {
  margin-top: 14px;
  background: var(--milk);
  border: 1px solid var(--rule);
  position: relative;
}

.skyline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: var(--slate) var(--parchment);
  scrollbar-width: thin;
}

.skyline-canvas-wrap {
  position: relative;
  min-width: 960px;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
}

/* One continuous, razor-sharp 2px baseline across axis and all stalks */
.skyline-canvas-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 184px;
  height: 2px;
  background: var(--blazer);
  z-index: 5;
  pointer-events: none;
}

/* Left Y-axis botanical lane labels */
.skyline-axis {
  position: relative;
  height: 184px;
  border-right: 1px solid var(--rule);
  background: var(--parchment);
  user-select: none;
}

.skyline-axis__lane {
  position: absolute;
  left: 8px;
  right: 12px;
  text-align: right;
  transform: translateY(50%);
}

.skyline-axis__name {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blazer);
  white-space: nowrap;
}

.skyline-axis__foot {
  height: 50px;
  padding: 0 12px;
  background: var(--parchment);
  border-right: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Field area with SVG narrative spline + interactive stalks */
.skyline-field {
  position: relative;
  min-width: 0;
}

.skyline-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 184px;
  pointer-events: none;
  z-index: 1;
}

.skyline-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--rule);
}

/* SVG kinetic narrative spline sits visibly above column ground and meets amber gland cleanly */
.skyline-spline-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 184px;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

.spline-path-bg {
  fill: none;
  stroke: #d2c5ad;
  stroke-width: 1.75;
  stroke-dasharray: 4 5;
}

.spline-path-thread {
  fill: none;
  stroke: var(--brick);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spline-pulse-dot {
  fill: var(--amber);
  stroke: var(--blazer);
  stroke-width: 2;
}

/* Stalk columns (transparent stage background so SVG spline is never masked) */
.skyline-stalks {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: stretch;
}

.stalk-btn {
  flex: 1 1 0;
  min-width: 54px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blazer);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  position: relative;
}

.stalk-btn:hover .stalk-meta {
  background: rgba(236, 227, 210, 0.7);
}

.stalk-btn.is-active .stalk-meta {
  background: var(--parchment);
}

.stalk-btn.is-dimmed .trichome-assembly,
.stalk-btn.is-dimmed .stalk-meta {
  opacity: 0.28;
  transition: opacity 180ms ease;
}
.stalk-btn.is-dimmed:hover .trichome-assembly,
.stalk-btn.is-dimmed:hover .stalk-meta {
  opacity: 0.78;
}

.stalk-stage {
  height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

/* Botanical trichome anatomy */
.trichome-assembly {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stalk-btn:hover .trichome-assembly {
  transform: translateY(-2px);
}

.trichome-head-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  z-index: 6;
}

/* Maturation ring around active amber head */
.trichome-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  opacity: 0;
  transform: scale(0.75);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
  pointer-events: none;
}

.stalk-btn.is-active .trichome-ring {
  opacity: 1;
  transform: scale(1);
}

.trichome-head {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--blazer);
  border: 2px solid var(--blazer);
  transition: background-color 200ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 200ms ease;
}

.stalk-btn.is-past .trichome-head {
  background: var(--blazer);
}

.stalk-btn.is-future .trichome-head {
  background: var(--milk);
  border-color: var(--blazer);
}

.stalk-btn:hover .trichome-head {
  transform: scale(1.16);
}

/* Strictly ONE amber head in the entire timeline at any moment */
.stalk-btn.is-active .trichome-head {
  background: var(--amber);
  border-color: var(--blazer);
  transform: scale(1.26);
}

.trichome-stem {
  width: 8px;
  border-radius: 4px 4px 0 0;
  background: var(--blazer);
  transition: height 420ms cubic-bezier(0.22, 1, 0.36, 1), background-color 200ms ease, width 200ms ease;
}

.stalk-btn.is-future .trichome-stem {
  background: #8b93a6;
}

.stalk-btn.is-active .trichome-stem {
  width: 10px;
  background: var(--blazer);
}

/* Compact X-axis ticks below the continuous baseline */
.stalk-meta {
  height: 50px;
  padding: 6px 2px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  align-items: center;
  transition: background-color 160ms ease;
}

.stalk-year {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--slate);
  white-space: nowrap;
}

.stalk-btn.is-active .stalk-year {
  color: var(--brick);
}

.stalk-short {
  font-size: 11.5px;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding-inline: 2px;
}

.stalk-btn.is-active .stalk-short {
  font-weight: 700;
}

/* Compact Editorial Milestone Story Stage — fits on the same screen as the skyline */
.milestone-stage {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(260px, 4.3fr) minmax(0, 7.7fr);
  background: var(--parchment);
  border: 1px solid var(--rule);
  min-height: 300px;
}

@media (max-width: 860px) {
  .milestone-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

.milestone-media {
  display: flex;
  flex-direction: column;
  background: var(--blazer);
  min-height: 280px;
  border-right: 1px solid var(--rule);
}

@media (max-width: 860px) {
  .milestone-media {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    min-height: 220px;
  }
}

.milestone-media__frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  overflow: hidden;
  transition: background-color 240ms ease;
}

@media (max-width: 860px) {
  .milestone-media__frame {
    min-height: 210px;
  }
}

.milestone-media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 220ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.milestone-stage.is-transitioning .milestone-media__img {
  opacity: 0.15;
  transform: scale(1.02);
}

.milestone-media__caption {
  margin: 0;
  padding: 9px 14px;
  background: var(--parchment);
  color: var(--slate);
  font-size: 13px;
  line-height: 1.4;
  border-top: 1px solid var(--rule);
}

.milestone-body {
  padding: clamp(20px, 2.5vw, 30px) clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.milestone-stage.is-transitioning .milestone-body {
  opacity: 0.25;
  transform: translateY(4px);
}

.milestone-body__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}

.milestone-body .t-body {
  font-size: 16.5px;
  line-height: 1.55;
}

/* Inline compact sourced Figure strip */
.milestone-figure {
  background: var(--milk);
  border: 1px solid var(--rule);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  max-width: 620px;
}

.milestone-figure--sage {
  background: var(--sage);
  border-color: #8fa687;
}

.milestone-figure__val {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--blazer);
  white-space: nowrap;
}
.milestone-figure__unit {
  font-size: 0.48em;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-left: 0.16em;
}
.milestone-figure__text {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.milestone-figure__label {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.38;
  color: var(--blazer);
}
.milestone-figure__source {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  color: var(--slate);
}
.milestone-figure--sage .milestone-figure__source {
  color: #2d3752;
}

.milestone-meta-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}

.permalink-btn {
  background: transparent;
  border: 0;
  padding: 4px 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.permalink-btn:hover {
  color: var(--blazer);
}

/* PhD Examiner Testimonial Band */
.examiner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--blazer);
  border: 1px solid var(--blazer);
}
@media (max-width: 860px) {
  .examiner-grid {
    grid-template-columns: 1fr;
  }
}
.examiner-card {
  background: var(--milk);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.examiner-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.38;
  color: var(--blazer);
}

/* ==========================================================================
   SPLIT CONTENT SECTIONS (Talks, Projects, etc.)
   ========================================================================== */
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  background: var(--surface);
  color: var(--ink);
}

.split-section--reverse {
  grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr);
}

.split-section__copy-wrap {
  display: flex;
  justify-content: flex-end;
}

.split-section--reverse .split-section__copy-wrap {
  justify-content: flex-start;
}

.split-section__copy {
  width: 100%;
  max-width: 760px;
  padding: var(--section-pad) clamp(24px, 4vw, 56px) var(--section-pad) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.split-section--reverse .split-section__copy {
  padding: var(--section-pad) var(--gutter) var(--section-pad) clamp(24px, 4vw, 64px);
}

.split-section__media {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: var(--parchment);
}

.split-section__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .split-section,
  .split-section--reverse {
    grid-template-columns: 1fr;
  }
  .split-section__copy,
  .split-section--reverse .split-section__copy {
    max-width: none;
    padding: 56px var(--gutter);
  }
  .split-section__media {
    min-height: 380px;
  }
}

/* Simple editorial lists */
.ruled-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.ruled-list__item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 640px) {
  .ruled-list__item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ==========================================================================
   EXPERIENCE PAGE: DATA VIZ (Sativa/Indica vs Terpene Clusters) & CASE STUDIES
   ========================================================================== */
.chem-viz-card {
  background: var(--white);
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

@media (max-width: 900px) {
  .chem-viz-card {
    grid-template-columns: 1fr;
  }
}

.chem-viz-panel {
  padding: clamp(24px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chem-viz-panel--chart {
  border-right: 1px solid var(--rule);
}

@media (max-width: 900px) {
  .chem-viz-panel--chart {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
}

.silhouette-bars {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sbar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sbar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.sbar-track {
  height: 28px;
  background: var(--parchment);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.sbar-fill {
  height: 100%;
  transition: width 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sbar-fill--blazer {
  background: var(--blazer);
}
.sbar-fill--slate {
  background: var(--slate);
}
.sbar-fill--brick {
  background: var(--brick);
}

/* Cluster composition bar */
.cluster-stack {
  display: flex;
  height: 36px;
  border: 1px solid var(--blazer);
  overflow: hidden;
}
.cluster-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 6px;
}
.cluster-seg--1 {
  background: var(--blazer);
  color: var(--milk);
}
.cluster-seg--2 {
  background: var(--brick);
  color: var(--milk);
}
.cluster-seg--3 {
  background: var(--sage);
  color: var(--blazer);
  border-left: 1px solid var(--blazer);
}

/* Case study tabs */
.case-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  border-bottom: 1px solid var(--rule);
}

.case-tab {
  min-height: 48px;
  padding: 10px 0;
  margin-bottom: -1px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--slate);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 19px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.case-tab:hover {
  color: var(--blazer);
  border-bottom-color: var(--blazer);
}
.case-tab[aria-selected="true"] {
  color: var(--blazer);
  border-bottom-color: var(--brick);
}

.case-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (max-width: 880px) {
  .case-panel {
    grid-template-columns: 1fr;
  }
}

.case-main {
  background: var(--white);
  padding: clamp(24px, 3.5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px 24px;
  border-top: 1px solid var(--rule);
  padding-top: 22px;
}

.case-dl dt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brick);
  padding-top: 4px;
}

.case-dl dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .case-dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .case-dl dd {
    margin-bottom: 14px;
  }
}

.case-aside {
  background: var(--sage);
  color: var(--blazer);
  padding: clamp(24px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 0.32em 0.68em 0.28em;
  border-radius: var(--radius-sm);
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Role-fit interactive cards */
.role-card {
  background: var(--white);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  border: 0;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.role-card:hover {
  background: var(--milk);
}
.role-card.is-selected {
  background: var(--blazer);
  color: var(--milk);
}
.role-card.is-selected .muted {
  color: var(--mist);
}
.role-card.is-selected .eyebrow {
  color: var(--amber);
}

/* ==========================================================================
   SERVICES PAGE & ENQUIRY COMPOSER
   ========================================================================== */
.service-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px 64px;
  align-items: start;
}

@media (max-width: 880px) {
  .service-split {
    grid-template-columns: 1fr;
  }
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  font-size: 17px;
  line-height: 1.5;
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--brick);
}

.enquiry-form {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: clamp(24px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-weight: 700;
  font-size: 16px;
}

.field input,
.field textarea {
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--slate);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--blazer);
  font-size: 17px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blazer);
}

.field textarea {
  resize: vertical;
  min-height: 132px;
}

.form-feedback {
  padding: 16px 18px;
  background: var(--sage);
  color: var(--blazer);
  border: 1px solid var(--blazer);
  font-size: 15px;
  line-height: 1.5;
}
.form-feedback[hidden] {
  display: none;
}

/* ==========================================================================
   CONTACT BAND & TRICHOME SKYLINE FOOTER
   ========================================================================== */
.contact-band {
  background: var(--blazer);
  color: var(--milk);
  padding-top: var(--section-pad);
}

.contact-top {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 64px;
  align-items: flex-end;
  justify-content: space-between;
}

.contact-email {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.2;
  color: var(--milk);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}
.contact-email:hover {
  color: var(--amber);
}

/* Botanical Trichome Skyline anchored to bottom edge of Contact band */
.footer-trichomes {
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  margin-top: 48px;
  overflow: hidden;
}

.footer-trichome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.footer-trichome__head {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--milk);
}

.footer-trichome--amber .footer-trichome__head {
  background: var(--amber);
}

.footer-trichome__stalk {
  width: 11px;
  border-radius: 6px 6px 0 0;
  background: var(--milk);
}

.site-footer {
  background: var(--blazer-deep);
  color: var(--mist);
  padding: 28px 0;
}

.site-footer .muted {
  color: var(--mist);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.site-footer__links a {
  color: var(--mist);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer__links a:hover {
  color: var(--milk);
  text-decoration: underline;
}

/* ==========================================================================
   REDUCED MOTION SUPPORT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
