/* ---------- Tokens ---------- */
:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-tint: #efece0;
  --text: #232219;
  --text-secondary: #5c5a4e;
  --text-muted: #8a8776;
  --accent: #0f6e56;
  --accent-dark: #085041;
  --accent-tint: #e1f5ee;
  --border: rgba(35, 34, 25, 0.12);
  --border-strong: rgba(35, 34, 25, 0.22);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --max-width: 1080px;
  --section-pad: 6rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  color: var(--text);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 600;
}

.section-head {
  max-width: 640px;
  margin: 0 0 2.75rem;
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 0.6rem;
}

.section-head p {
  margin-top: 0.85rem;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

section {
  padding: var(--section-pad) 0;
}

section:nth-of-type(even) {
  background: var(--surface-tint);
}

/* ---------- Header / nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open {
    max-height: 400px;
  }
  .nav-links li {
    border-top: 1px solid var(--border);
  }
  .nav-links a {
    display: block;
    padding: 0.85rem 1.75rem;
  }
  .nav-toggle {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 4.5rem 0 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo {
    order: -1;
    max-width: 220px;
    margin: 0 auto;
  }
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.25;
  margin-bottom: 1.1rem;
}

.hero .subline {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 1.75rem;
}

@media (max-width: 820px) {
  .hero .subline {
    margin-left: auto;
    margin-right: auto;
  }
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 820px) {
  .tag-row {
    justify-content: center;
  }
}

.tag {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 500;
}

.cta-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .cta-row {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary:hover {
  opacity: 0.88;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.hero-photo img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat {
  text-align: center;
}

.stat .num {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--accent-dark);
  display: block;
}

.stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

/* ---------- Exec summary ---------- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 700px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}

.summary-item p {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.summary-item .num {
  font-family: var(--serif);
  color: var(--accent-dark);
  font-size: 1.3rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ---------- Case study cards ---------- */
.case-grid {
  display: grid;
  gap: 1.75rem;
}

.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

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

.case-card .eyebrow {
  margin-bottom: 0.5rem;
  display: block;
}

.case-card h3 {
  margin-bottom: 0.6rem;
}

.case-card p.desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 0.9rem;
}

.case-card .quote {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text);
  font-size: 0.98rem;
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
  margin-top: 1rem;
}

.case-card .quote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.case-card .result {
  text-align: center;
  min-width: 150px;
  padding: 1.25rem;
  background: var(--accent-tint);
  border-radius: var(--radius);
}

.case-card .result .num {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--accent-dark);
  display: block;
}

.case-card .result .label {
  font-size: 0.78rem;
  color: var(--accent-dark);
  margin-top: 0.25rem;
  display: block;
}

.case-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dark);
}

.placeholder-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.6rem;
}

/* ---------- Systems ---------- */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

@media (max-width: 700px) {
  .systems-grid {
    grid-template-columns: 1fr;
  }
}

.system-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.system-card h3 {
  margin-bottom: 0.6rem;
}

.system-card p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-bottom: 1rem;
}

.system-demo {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--surface-tint);
}

/* ---------- Teaching ---------- */
.teaching-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.teaching-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  background: var(--surface);
}

.teaching-item .name {
  font-weight: 500;
  font-size: 0.98rem;
}

.teaching-item .role {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: block;
}

/* ---------- Operate ---------- */
.operate-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .operate-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .operate-grid {
    grid-template-columns: 1fr;
  }
}

.operate-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-dark);
  border-radius: var(--radius-lg);
  padding: 2.1rem 1.6rem 1.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.operate-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dark);
}

.operate-item .index {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 2.75rem;
  font-weight: 500;
  display: block;
  line-height: 1;
  margin-bottom: 1.15rem;
}

.operate-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

.operate-item p {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* ---------- Timeline ---------- */
.timeline {
  border-left: 2px solid var(--border-strong);
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.44rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-dark);
}

.timeline-item .dates {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  display: block;
}

.timeline-item h3 {
  margin-bottom: 0.15rem;
}

.timeline-item .org {
  font-size: 0.92rem;
  color: var(--accent-dark);
  font-weight: 500;
  display: block;
  margin-bottom: 0.6rem;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 620px;
}

/* ---------- Contact ---------- */
.contact-section {
  text-align: center;
}

.contact-section h2 {
  margin-bottom: 1rem;
}

.contact-section p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.contact-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* ---------- Case study detail pages ---------- */
.detail-hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-dark);
}

.detail-hero .eyebrow {
  display: block;
  margin: 0.25rem 0 0.75rem;
}

.detail-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  max-width: 720px;
  margin-bottom: 1rem;
}

.detail-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.detail-body {
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

@media (max-width: 800px) {
  .detail-body {
    grid-template-columns: 1fr;
  }
}

.detail-body h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}

.detail-body h2:first-child {
  margin-top: 0;
}

.detail-body p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.detail-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.detail-side .result-block {
  margin-bottom: 1.25rem;
}

.detail-side .result-block .num {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--accent-dark);
  display: block;
}

.detail-side .result-block .label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.detail-side .quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.detail-side .quote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
