/* === Fonts === */
@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "DM Sans";
  src: url("./fonts/DMSans-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
}

/* === Reset & Base Styles === */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "DM Sans", system-ui, sans-serif;
  background-color: #fff;
  color: #222;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* === Wrapper / Content === */
#wrapper {
  width: 100%;
  min-height: 100%;
  overflow: visible;
}

#content {
  width: 100%;
  position: relative;
}

/* === General Header === */
.sticky-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1000;

  width: 100%;
  /* let it span across the page */
  padding: 10px 0;
  margin: 0;
  /* remove margins here */
  display: flex;
  justify-content: center;
  /* centers the inner container */
}

.header-container {
  width: 100%;
  max-width: 1200px;
  /* same as panels */
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-text {
  font-size: 1.4rem;
  color: #000;
  margin-right: 8px;
}

.logo-img {
  height: 50px;
}

/* === Desktop Nav === */
.nav-links {
  display: flex;
  gap: 15px;
}

.nav-links a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
  padding: 8px 16px;
  border-radius: 20px;
  /* round bubbles */
  background: #f5f5f5;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background: #410100;
  color: #fff;
}

/* === Mobile Hamburger === */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* === Mobile Menu === */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
  background: white;
  align-items: center;
  /* center bubbles */
}

.mobile-menu a {
  font-weight: bold;
  text-decoration: none;
  color: #333;
  padding: 8px 16px;
  border-radius: 20px;
  background: #f5f5f5;
  transition: all 0.3s ease;
  width: auto;
  /* only as wide as content */
  text-align: center;
}

.mobile-menu a:hover {
  background: #460606;
  color: white;
}

.mobile-menu.active {
  display: flex;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* hide desktop nav */
  }

  .hamburger {
    display: block;
    /* show hamburger */
  }
}

.video-panel {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 500px;
  height: clamp(300px, 35vh, 600px);
}

.video-panel .background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  max-height: 500px;
}

/* === Centered Text Content === */
.header-text-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 90%;
  max-width: 900px;
  background: transparent !important;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;

  gap: 0.4rem;
  padding: 1rem 1.5rem;
  color: white;
  box-sizing: border-box;

  max-height: 500px;
  height: 100%;
}

.header-text {
  font-size: clamp(0.7rem, 1.0vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  margin-left: 100px;
}

.header-link {
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.header-link:hover {
  transform: translateX(4px);
  color: #ffdada;
}

.header-link .arrow {
  display: inline-block;
}

/* === Responsive Tweaks === */
@media (max-width: 768px) {
  .video-panel {
    height: clamp(220px, 25vh, 420px);
    /* smaller phones, still centered */
  }
}

@media (max-width: 480px) {
  .video-panel {
    height: clamp(100px, 20vh, 360px);
  }

  .header-text {
    font-size: clamp(0.7rem, 1vw, 1.8rem);
  }

  .header-link {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
  }
}

/* === Sections & Content === */
.section-box {
  width: 90%;
  max-width: 1200px;
  margin: 3vh auto;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --color1: #61010E;
  --color2: #410100;
  background: linear-gradient(135deg, var(--color1), var(--color2), var(--color2));
  color: white;
}

/* === Tablets === */
@media (max-width: 1024px) {
  .section-box {
    width: 95%;
    /* more space for smaller screens */
    padding: 35px 25px;
  }
}

/* === Large Phones === */
@media (max-width: 768px) {
  .section-box {
    width: 95%;
    padding: 30px 20px;
  }
}

/* === Small Phones === */
@media (max-width: 480px) {
  .section-box {
    width: 95%;
    /* auto left/right to center */
    padding: 20px 15px;
  }
}

.section-box:first-of-type {
  margin-top: 10px;
}


body.solutions .section-box:first-of-type {
  margin-top: 80px;
}

body.frost-page {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body.frost-page {
  --plot-embed-height: clamp(520px, 60vw, 760px);
}


.content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

p {
  font-size: 1.4rem;
  line-height: 1.8;
  margin-bottom: 35px;
}



/* === Contact Section === */
#contact {
  width: 100%;
  background-color: #fff;
  margin: 8rem auto;
  /* vertical spacing */
  padding: 4rem 1.5rem;
}

.contact-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.contact-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.contact-header p {
  font-size: 1.125rem;
  color: #4b5563;
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 2px #791F1E;
  border-color: #8B313C;
}

.form-submit {
  grid-column: 1 / -1;
  text-align: right;
}

.form-submit button {
  background-color: #4D0007;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-submit button:hover {
  background-color: #410100;
}

body.contact-page main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0
}

body.contact-page #contact {
  margin-top: 0rem !important;
  /* or whatever height you want */
  padding: 0rem
}

.contact-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4rem auto 0rem;
  /* top | left/right | bottom */
  padding: 0rem;
}

.contact-logo {
  width: clamp(160px, 10vw, 380px);
  height: auto;
  opacity: 0.95;
}


/* === Footer === */
#footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 40px 20px;
  font-family: sans-serif;
}

.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  gap: 40px;
}

.footer-wrapper h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #fff;
}

.footer-wrapper p,
.footer-wrapper li {
  margin: 5px 0;
  color: #fff;
}

.footer-wrapper a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-wrapper a:hover {
  color: #1da1f2;
}

.footer-sections ul,
.footer-social ul {
  list-style: none;
  padding: 0;
}

.footer-sections li,
.footer-social li {
  margin-bottom: 8px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background-color: transparent;
  padding: 0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #1da1f2;
}

.footer-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-legal a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: #1da1f2;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9rem;
  opacity: 0.7;
  color: #fff;
}



/* === Section === */

.section,
.section-solid {
  width: 95%;
  max-width: 1200px;
  margin: 150px auto;
  /* increased top/bottom spacing for desktop */
  padding: 1rem;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --color1: #4D0007;
  --color2: #410100;
  background: linear-gradient(135deg, var(--color1), var(--color2), var(--color2));
  color: white;
  display: flex;
  flex-direction: column;
  transition: background 10s ease;
}

.section-solid {
  background: #4D0007;
}

@media (max-width: 768px) {
  .section,
  .section-solid {
    margin: 30px auto;
    /* smaller spacing for mobile */
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 10px;
  text-align: left;
}

.section-grid {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 12px;
}

.section-panel {
  position: relative;
  display: flex;
  cursor: pointer;
  overflow: hidden;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  padding: 1rem;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease;
  background-color: rgba(255, 255, 255, 0.1);

}

.section-panel img {
  width: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.5s ease;
}

@media (max-width: 1024px) {
  .section-grid {
    flex-direction: column;
  }
}


/* === Intro Section === */
.intro-section {
  background: transparent;
  box-shadow: none;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(1rem, 2vh, 2.5rem) clamp(1rem, 5vw, 3rem);
  /* responsive horizontal padding */
}

.intro-wrapper {
  width: clamp(90%, 800px, 100%);
  text-align: center;
}

/* Base text styling */
.intro-text {
  font-size: clamp(1rem, 4vw, 2.5rem);
  /* scales fluidly across devices */
  font-weight: 300;
  line-height: 1.2;
  color: #410100;
  margin: 0 auto;
}

/* === Benefits Section === */

.section-panel.benefits-panel img {
  height: 300px;
  object-fit: cover;
  border-radius: inherit;
}

.section-panel.simple-panel {
  position: relative;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  min-height: 300px;
  text-align: center;
  padding: 1rem;
}

.section-panel.simple-panel .simple-panel-content {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-panel.simple-panel .simple-panel-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--simple-bg, url("images/cherry_bloom3.jpg"));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(8px) brightness(0.7);
  transform: scale(1.05);
  transition: transform 0.35s ease, filter 0.35s ease;
  z-index: 0;
}

.section-panel.simple-panel .simple-panel-title {
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  color: #fff;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
  transition: transform 0.35s ease, letter-spacing 0.35s ease;
}

.section-panel.simple-panel .simple-panel-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
  transition: transform 0.35s ease;
}

.section-panel.simple-panel .simple-panel-icon {
  width: 48px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.section-panel.simple-panel .simple-panel-icon.is-wide {
  width: 58px;
}

.section-panel.simple-panel .simple-panel-icon svg {
  width: 100%;
  height: 100%;
  stroke: #fff;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-panel.simple-panel .simple-panel-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.section-panel.simple-panel:hover .simple-panel-icon img {
  filter: brightness(0) invert(1) !important;
}

.section-panel.simple-panel:hover .simple-panel-content::before {
  transform: scale(1.08);
  filter: blur(3px) brightness(0.8);
}

.section-panel.simple-panel:hover .simple-panel-stack {
  transform: translateY(-2px);
}

.section-panel.simple-panel:hover .simple-panel-title {
  letter-spacing: 0.04em;
}

/* === Tabbed Section === */
.tabbed-section {
  --panel-bg: rgba(255, 255, 255, 0.06);
  margin-top: 2rem;
  padding: 2.5rem 1.5rem 1.5rem;
  border-radius: 12px;
  position: relative;
}

.tabbed-section::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.tab-header {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: visible;
  position: absolute;
  top: -16px;
  left: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  height: 36px;
  flex-wrap: nowrap;
}

.tab-header[data-active="temperate"] .tab-highlight {
  border-color: rgba(248, 212, 212, 0.75);
  background: rgba(248, 212, 212, 0.14);
}

.tab-header[data-active="mediterranean"] .tab-highlight {
  border-color: rgba(207, 227, 255, 0.75);
  background: rgba(207, 227, 255, 0.14);
}

.tab-highlight {
  position: absolute;
  top: 0;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(207, 22, 22, 0.35);
  z-index: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.tab-button {
  background: transparent;
  border: none;
  color: #e5e5e5;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0 1.25rem;
  flex: 1;
  height: 36px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.tab-button:hover {
  color: #fff;
}

.tab-button.is-active.tab-temperate {
  color: #f8d4d4;
}

.tab-button.is-active.tab-mediterranean {
  color: #cfe3ff;
}

.tab-panels {
  margin-top: 1rem;
  position: relative;
  z-index: 1;
}

.tab-panel {
  display: none;
  color: #f5f5f5;
  line-height: 1.6;
  font-size: 1rem;
}

.tab-panel-title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.tab-panel.is-active {
  display: block;
}

/* Plotly charts in tabs */
.plotly-chart {
  width: 100%;
  margin-top: 1rem;
}


.plot-embed {
  width: 100%;
  height: var(--plot-embed-height);
  min-height: var(--plot-embed-height);
  margin-top: 1rem;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  display: block;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.plot-row {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  margin-top: 1rem;
}


.plot-row .plot-embed {
  margin-top: 0;
  flex: 1 1 60%;
  min-width: 0;
}

.plot-caption {
  flex: 1 1 8%;
  color: #f5f5f5;
  font-size: 0.8rem;
  line-height: 1.6;
  min-width: 0;

}

.plot-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

.tab-panel-title-spaced {
  margin-top: 1.75rem;
}


@media (max-width: 900px) {
  .plot-row {
    flex-direction: column;
    gap: 1rem;
  }

  .plot-caption {
    font-size: 1rem;
  }

  .plot-embed {
  }
}

@media (max-width: 600px) {
  body.frost-page {
    --plot-embed-height: clamp(420px, 78vw, 620px);
  }

  .plot-embed {
    height: var(--plot-embed-height);
    min-height: var(--plot-embed-height);
  }
}

@media (max-width: 480px) {
  body.frost-page {
    --plot-embed-height: clamp(360px, 92vw, 520px);
  }

  .plot-embed {
    height: var(--plot-embed-height);
    min-height: var(--plot-embed-height);
  }
}

@media (max-width: 820px) {
  .tabbed-section {
    padding: 2.25rem 1.1rem 1.25rem;
  }
}

@media (max-width: 680px) {
  .tabbed-section {
    padding: 1.25rem 0.9rem 1.1rem;
  }

  .tabbed-section::before {
    top: 18px;
  }

  .tab-header {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .tab-highlight {
    display: none;
  }

  .tab-button {
    flex: 1 1 100%;
    height: auto;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
  }

  .tab-button.is-active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
  }
}

@media (max-width: 520px) {
  .frost-section {
    padding: 18px 10px;
  }

  .frost-section .content-wrapper {
    padding: 0 4px;
  }

  .frost-section p,
  .frost-section .tab-panel {
    font-size: 0.98rem;
  }
}

/* === Frost Risk Page Tweaks === */
.frost-section {
  padding: 24px 14px;
}

.frost-section .content-wrapper {
  padding: 0 8px;
}

.frost-section p,
.frost-section .tab-panel {
  font-size: 1.05rem;
  line-height: 1.65;
}

#benefits .section-panel:hover img {
  filter: brightness(0.9);
}

.benefit-panel-content {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  color: white;
  padding: 2rem;
}

.benefit-panel-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.benefit-panel-text {
  font-size: 0.875rem;
  opacity: 0.5;
  max-height: 0;
  overflow: hidden;
  padding-right: 4px;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}




/* === About Section === */

/* === About Section Base === */
#about.section {
  padding: 4rem 2rem;
  /* increased overall spacing */
}

#about .about-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#about .about-intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  max-width: 700px;
  margin: 0;
  padding: 0;
}

/* Titles and subtitles */
#about .section-title,
#about .section-subtitle {
  display: block;
  margin: 0;
  /* removes all default top/bottom margins */
  padding: 0;
  text-align: left;
}

#about .section-subtitle {
  font-size: 1rem;
  line-height: 1.5;
  color: #ddd;
}

/* Remove default margin from any <p> inside intro or subtitle */
#about .about-intro p,
#about .section-subtitle p {
  margin: 0;
  padding: 0;
}

/* === About Panels === */
.section-panel.about-panel {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: default;
  max-width: 340px;
  height: 100%;
}

/* Equal panel height across all */
#about .section-grid {
  align-items: stretch;
}

/* === About Image === */
.about-image {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3 / 4;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 12px;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* === About Info === */
.about-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.about-info h3 {
  margin: 10px 0 5px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  min-height: 1.4em;
}

.about-info p {
  margin: 0;
  font-size: 0.95rem;
  color: #bbb;
  min-height: 1.2em;
}

.profile-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
  justify-content: center;
}

.profile-link {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.profile-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.profile-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-read-more {
  margin-top: 0.65rem;
  display: inline-block;
  font-size: 0.9rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.profile-read-more:hover {
  text-decoration: underline;
}




/* === Tablet & Mobile Layout (Stacked) === */
@media (max-width: 1000px) {
  #about .about-layout {
    flex-direction: column;
    align-items: center;
  }

  #about .about-intro {
    order: 1;
    text-align: center;
    margin-bottom: 2rem;
  }

  #about .section-grid {
    order: 2;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    width: 100%;
  }

  .section-panel.about-panel {
    flex: 1 1 320px;
    max-width: 340px;
  }

  #about .section-title,
  #about .section-subtitle {
    text-align: center;
    margin-left: 0;
  }

  .about-image {
    aspect-ratio: auto;
    height: auto;
  }
}

@media (min-width: 992px) {
  #about .about-layout {
    flex-direction: row;
    align-items: stretch;
  }

  #about .about-intro {
    flex: 1;
    max-width: 35%;
  }

  #about .section-grid {
    flex: 2;
  }
}

.cv-download {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  background-color: #7a1d1d; /* deep muted red tone */
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.cv-download:hover {
  background-color: #972626; /* slightly lighter red */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cv-download:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}


/* === Global Reset / Touch Highlights === */
* {
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important;
  -webkit-focus-ring-color: rgba(255, 255, 255, 0) !important;
  outline: none !important;
}

/* === Body wrapper === */
body.globe-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: transparent;
  padding: 1rem;
  box-sizing: border-box;
  height: auto;
}

/* === Globe section wrapper === */
.globe-section {
  width: 95%;
  max-width: 1200px;
  margin: 80px auto 0;
  margin-bottom: 4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.globe-section h2 {
  margin-bottom: 0.5rem;
}

.globe-intro {
  font-size: 1rem;
  margin: 0 0 1rem 0;
  text-align: justify;
  line-height: 1.6;
  max-width: 800px;
}

.globe-reference-link-wrap {
  margin: 0;
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.globe-reference-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid rgba(65, 1, 0, 0.18);
  background: rgba(65, 1, 0, 0.04);
  color: #410100;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.globe-reference-link:hover {
  background: rgba(65, 1, 0, 0.09);
  border-color: rgba(65, 1, 0, 0.3);
  color: #2f0000;
}

/* === Main container: globe + panel === */
.globe-container {
  display: flex;
  gap: 2rem;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  /* make this the reference for absolute positioning */
}

/* === Globe side === */
#globeContainer,
.globe-wrapper {
  flex: 1 1 60%;
  min-width: 300px;
  max-height: 700px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
}

#globeViz,
.globe-wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

#globeViz {
  position: relative;
  z-index: 1;
  /* below the label */
}

.globe-label {
  position: absolute;
  top: 55%;
  left: 60%;
  transform: translate(-50%, -50%);
  padding: 0.6rem 1rem;
  background: #f9f9f9;
  color: #635a5a;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 9999;
  /* ensure it’s on top of the globe */
  text-align: center;
  white-space: nowrap;

  /* Floating balloon animation */
  animation: floaty 4s ease-in-out infinite;
}

/* === Reference panel === */
#refList {
  flex: 0 0 300px;
  max-width: 35%;
  max-height: 700px;
  overflow-y: auto;
  --color1: #4D0007;
  --color2: #410100;
  background: linear-gradient(135deg, var(--color1), var(--color2));
  color: white;
  border-radius: 12px;
  padding: 1rem;
  box-sizing: border-box;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  line-height: 1.4;
}

/* Transparent background for text */
#refList .text-bg {
  background-color: rgba(255, 255, 255, 0.2);
  /* semi-transparent white */
  border-radius: 8px;
  padding: 0.75rem;
}

#refList h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

#refList .ref-entry {
  background-color: rgba(255, 255, 255, 0.2);
  /* semi-transparent white */
  border-radius: 8px;
  /* rounded corners */
  padding: 0.75rem;
  /* inner spacing */
  margin-bottom: 0.75rem;
  /* space between entries */
}

.ref-entry a {
  color: #7ecbff;
  text-decoration: underline;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.ref-entry .authors {
  font-size: 0.875rem;
  color: #dcdcdc;
  margin-bottom: 0.125rem;
}

.ref-entry .journal {
  font-size: 0.875rem;
  color: #aab3bc;
}

#refList a:hover {
  color: #a6ddff;
}

/* Scrollbar styling */
#refList::-webkit-scrollbar {
  width: 3px;
}

#refList::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

#refList::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

/* === Responsive === */
@media (max-width: 900px) {
  .globe-container {
    flex-direction: column-reverse;
  }

  #globeContainer,
  #refList,
  #leftPanel {
    flex: 1 1 100%;
    max-width: 100%;
  }

  #refList {
    max-height: 400px;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .globe-intro {
    text-align: center;
    margin: 0 auto 1rem auto;
    max-width: 90%;
  }

  .globe-container {
    width: 100%;
    /* full width */
    margin: 40px auto;
    /* valid value */
    flex-direction: column-reverse;
    gap: 1rem;
    min-height: 100px;
  }

  #globeContainer {
    order: 0;
    width: 100%;
    height: auto;
    min-height: 250px;
  }

  #leftPanel {
    order: 1;
    width: 100%;
    max-height: none;
    overflow: visible;
  }
}


@keyframes floaty {
  0% {
    transform: translate(-50%, -50%) translateY(0px);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-8px);
  }

  100% {
    transform: translate(-50%, -50%) translateY(0px);
  }
}




.crops-grid {
  display: grid;

  /* exactly 3 rows, fill columns top→bottom */
  grid-template-rows: repeat(3, 1fr);
  grid-auto-flow: column;

  /* tracks shrink first, then grow */
  --panel-min: 120px;
  /* how small a panel may get */
  grid-auto-columns: minmax(var(--panel-min), 1fr);

  /* gaps/padding also shrink before overflow */
  gap: clamp(0.6rem, 1.5vw, 1.4rem);

  width: min(100%, 1200px);
  margin: 0 auto;

  background: rgba(145, 127, 127, 0.253);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  box-sizing: border-box;


  position: relative;
  /* allows absolute children */
  --pad: clamp(0.8rem, 2vw, 1.6rem);
  /* reuseable padding var */
  padding: var(--pad);
  /* extra bottom room so the button doesn’t clip */
}

/* cards fill their track and stay square */
.crop-panel {
  width: 100%;
  /* fills the grid track */
  aspect-ratio: 1 / 1;
  /* perfect square */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
}

/* keep inner sizing consistent */
.crop-inner {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

/* Image remains proportionally scaled */
.crop-front img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

/* Flipping logic unchanged */
.crop-front,
.crop-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.25s ease;
}

.crop-back {
  opacity: 0;
  color: #000;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  /* scales text too */
  text-align: center;
  padding: 0.5rem;
}

.crop-flipped .crop-front {
  opacity: 0;
}

.crop-flipped .crop-back {
  opacity: 1;
}

@media (max-width: 1100px) {
  .crops-grid {
    grid-template-rows: repeat(4, auto);
  }
}

@media (max-width: 900px) {
  .crops-grid {
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: row;
    /* revert to standard flow for compact screens */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}


/* ======= Satellite styling ======= */
.satellite {
  position: absolute;
  width: 170px;
  min-height: 80px;
  padding: 0.65rem 0.9rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  /* JS animates this */

  /* --- Balanced glass & readability --- */
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.3),
    inset 0 0 10px rgba(255, 255, 255, 0.05);

  /* --- Typography --- */
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.75rem;
  color: #1a1a1a;
  /* dark text for strong contrast */
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-decoration: none;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: auto;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}


/* was `.satellite a` before */
.satellite .title {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #053680;
}

/* was `.satellite a:hover` before */
.satellite:hover .title {
  color: #131212;
  text-decoration: underline;
}

/* --- Soft glass highlight --- */
.satellite::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.05) 60%);
  mix-blend-mode: overlay;
  opacity: 0.3;
  pointer-events: none;
}

/* --- Hover enhancement --- */
.satellite:hover {
  background: rgba(255, 255, 255, 0.789);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.25);
  z-index: 3;
}

/* --- Link and hierarchy --- */
.satellite a {
  text-decoration: none;
  color: #053680;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.satellite a:hover {
  color: #131212;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.satellite .authors {
  font-size: 0.66rem;
  color: rgba(0, 0, 0, 0.8);
}

.satellite .journal {
  font-size: 0.62rem;
  color: rgba(58, 57, 57, 0.726);
}

.crop-panel.active {
  z-index: 10;
  transform: scale(1.08);
  transition: all 0.4s ease;
}

.crop-panel.active .crop-inner {
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(255, 255, 255, 0.15),
    0 0 80px rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
}


.crops-toggle {
  position: absolute;
  left: 50%;
  bottom: var(--pad);
  transform: translateX(-50%);
  z-index: 5;

  width: clamp(180px, 60%, 420px);
  height: 2.5rem;
  display: none;
  /* shown only at 2-col breakpoint via JS */
  align-items: center;
  justify-content: center;
  gap: .5rem;

  font: 600 .95rem/1 "DM Sans", system-ui, sans-serif;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}

.crops-toggle:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .35);
}

.crops-toggle:active {
  transform: translateX(-50%) translateY(1px);
}

.crops-toggle .chevron {
  transition: transform .2s ease;
}

.crops-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* fade mask when collapsed so the button sits “in front” of the last row */
.crops-grid.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4.5rem;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .22) 100%);
}

/* collapse rule: hide after first 6 items (3 rows × 2 cols) */
.crops-grid.collapsed .crop-panel:nth-child(n + 5) {
  display: none;
}

/* 2-col breakpoint (same as before; adjust if needed) */
@media (max-width: 860px) {
  .crops-grid {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: repeat(2, minmax(var(--panel-min, 120px), 1fr));

    /* add space for button ONLY on small screens: */
    padding-bottom: calc(var(--pad) + 3.25rem);
  }


}

.crops-toggle[hidden] { display: none !important; }  /* JS can force-hide */

/* 2-col breakpoint: allow it to be visible (unless [hidden]) */
@media (max-width: 860px) {
  .crops-toggle { display: flex; }
}
