/* ==========================================================================
   MOCHA Lab — Design System
   Multi-agent, Observational, Cognitive, Human-AI & Aesthetics Lab
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Mocha palette — light, warm, low-contrast browns on cream */
  --cream:         #FBF5EC;
  --cream-2:       #F5EBDD;
  --latte:         #EEDFC9;
  --tan:           #D9BE9C;
  --mocha-light:   #C9A67C;
  --mocha:         #A9784E;
  --mocha-deep:    #7A5738;
  --espresso:      #4A3524;
  --espresso-dark: #2E2015;
  --ink:           #362718;
  --white:         #FFFFFF;
  --accent-foam:   #F1E4CE;

  --shadow-soft: 0 2px 14px rgba(122, 87, 56, 0.07);
  --shadow-med:  0 6px 24px rgba(122, 87, 56, 0.11);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

p { margin: 0 0 1em; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mocha-deep);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--mocha);
  display: inline-block;
}

/* ==========================================================================
   Top navigation
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(251, 245, 236, 0.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(122, 87, 56, 0.12);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 40px;
  height: auto;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--espresso-dark);
}

.brand__furman {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mocha-deep);
}

.brand__furman:hover { text-decoration: underline; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--espresso);
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover { background: var(--latte); }

.nav-links a.active {
  background: var(--mocha-deep);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--espresso);
  margin: 5px 0;
  transition: 0.25s ease;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 80px 0 88px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--mocha);
  font-style: italic;
  font-weight: 500;
}

.hero__lede {
  font-size: 1.12rem;
  color: var(--espresso);
  max-width: 54ch;
  margin-bottom: 30px;
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.brewing-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--tan);
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mocha-deep);
  margin-bottom: 26px;
}

.hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo img {
  width: 100%;
  max-width: 260px;
  height: auto;
  animation: float-logo 5s ease-in-out infinite;
}

@keyframes float-logo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn--primary {
  background: var(--mocha-deep);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover { background: var(--espresso); box-shadow: var(--shadow-med); }

.btn--ghost {
  background: transparent;
  border-color: var(--mocha-deep);
  color: var(--mocha-deep);
}
.btn--ghost:hover { background: var(--latte); }

/* ==========================================================================
   Sections generic
   ========================================================================== */

section { padding: 76px 0; }
section.tight { padding: 52px 0; }

.section-head {
  max-width: 700px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head.left { text-align: left; margin-left: 0; }

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p {
  color: var(--espresso);
  font-size: 1.05rem;
}

/* ==========================================================================
   MOCHA breakdown — borderless, editorial layout
   ========================================================================== */

.mocha-grid {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.mocha-card {
  flex: 1;
  text-align: center;
  padding: 0 18px;
  position: relative;
}

.mocha-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--latte);
}

.mocha-card__icon {
  width: 30px;
  height: 30px;
  margin: 0 auto 14px;
  color: var(--mocha);
}

.mocha-card__letter {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--mocha-deep);
  display: block;
  margin-bottom: 6px;
}

.mocha-card h4 {
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.mocha-card p {
  font-size: 0.87rem;
  color: var(--espresso);
  margin-bottom: 0;
}

/* ==========================================================================
   Application / focus cards
   ========================================================================== */

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.research-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.research-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  border: 1px solid rgba(122, 87, 56, 0.09);
  transition: border-color 0.2s ease;
}

.research-card:hover { border-color: var(--mocha-light); }

.research-card__icon {
  width: 38px;
  height: 38px;
  color: var(--mocha-deep);
  background: var(--latte);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 16px;
}

.research-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.research-card p {
  font-size: 0.9rem;
  color: var(--espresso);
  margin-bottom: 0;
}

/* ==========================================================================
   Collaboration callout — light
   ========================================================================== */

.callout {
  background: var(--white);
  border: 1.5px solid var(--tan);
  border-radius: var(--radius-lg);
  padding: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.callout__text { max-width: 620px; }
.callout h2 { margin-bottom: 10px; font-size: 1.7rem; }
.callout p { color: var(--espresso); margin-bottom: 0; font-size: 1rem; }

/* ==========================================================================
   People page
   ========================================================================== */

.pi-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid rgba(122, 87, 56, 0.1);
  align-items: center;
}

.pi-card__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--latte);
  border: 4px solid var(--white);
  box-shadow: var(--shadow-med);
}

.pi-card__photo img,
.pi-card__photo svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pi-card__name { font-size: 1.7rem; margin-bottom: 2px; }
.pi-card__role { font-weight: 600; color: var(--mocha-deep); margin-bottom: 14px; }

.collab-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(122, 87, 56, 0.1);
  max-width: 260px;
  text-align: center;
}

.collab-card__photo {
  width: 108px;
  height: 148px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-med);
}

.collab-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collab-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.collab-card h3 a:hover { text-decoration: underline; }
.collab-card .role { font-weight: 600; color: var(--mocha-deep); font-size: 0.85rem; margin-bottom: 0; }

.pi-card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--latte);
  color: var(--espresso-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.pi-card__status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mocha);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.pi-card__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--tan);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--espresso);
  transition: all 0.2s ease;
}

.icon-link:hover {
  background: var(--mocha-deep);
  color: var(--white);
  border-color: var(--mocha-deep);
}

.icon-link svg { width: 16px; height: 16px; }

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.ghost-card {
  border: 2px dashed var(--tan);
  border-radius: var(--radius-md);
  padding: 34px 22px;
  text-align: center;
  color: var(--mocha-deep);
  background: rgba(255,255,255,0.4);
}

.ghost-card__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  color: var(--tan);
}

.ghost-card h4 { font-size: 0.98rem; color: var(--espresso); margin-bottom: 6px; }
.ghost-card p { font-size: 0.88rem; margin-bottom: 0; }
.ghost-card a { text-decoration: underline; color: var(--mocha-deep); font-weight: 600; }

/* ==========================================================================
   Publications page
   ========================================================================== */

.pub-tag-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--mocha);
  margin: 40px 0 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--latte);
}
.pub-tag-heading:first-of-type { margin-top: 0; }

.pub-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(122, 87, 56, 0.12);
}
.pub-item:last-child { border-bottom: none; }

.pub-item__title {
  font-weight: 700;
  color: var(--espresso-dark);
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.pub-item__authors {
  font-size: 0.92rem;
  color: var(--espresso);
  margin-bottom: 4px;
}
.pub-item__authors strong { color: var(--mocha-deep); }

.pub-item__venue {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--mocha-deep);
  margin-bottom: 0;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: start;
}

.contact-info {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid rgba(122, 87, 56, 0.1);
}

.contact-info h3 { font-size: 1.2rem; }
.contact-info ul { list-style: none; padding: 0; margin: 20px 0 0; }
.contact-info li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(122, 87, 56, 0.1);
  font-size: 0.94rem;
}
.contact-info li:first-child { border-top: none; }
.contact-info li svg { width: 20px; height: 20px; color: var(--mocha-deep); flex-shrink: 0; }

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid rgba(122, 87, 56, 0.1);
}

.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; color: var(--espresso-dark); }

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--tan);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--mocha);
  box-shadow: 0 0 0 3px rgba(169, 120, 78, 0.18);
}

.form-row textarea { resize: vertical; min-height: 130px; }

.form-error { color: #B23A2C; font-size: 0.82rem; margin-top: 6px; display: block; }

.form-success {
  display: none;
  background: var(--latte);
  color: var(--espresso-dark);
  border-radius: 12px;
  padding: 18px 20px;
  font-weight: 600;
  margin-bottom: 20px;
  align-items: center;
  gap: 10px;
}
.form-success.visible { display: flex; }

.form-general-error {
  display: none;
  background: #F7E3DF;
  color: #8A2E20;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.form-general-error.visible { display: block; }

/* ==========================================================================
   Footer — light
   ========================================================================== */

footer {
  background: var(--cream-2);
  border-top: 1px solid rgba(122, 87, 56, 0.14);
  color: var(--espresso);
  padding: 40px 0 26px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--espresso-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-brand img { width: 28px; height: auto; }

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }

.footer-links a { font-size: 0.88rem; color: var(--mocha-deep); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--espresso-dark); }

.footer-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(122, 87, 56, 0.14);
  font-size: 0.78rem;
  color: var(--mocha);
  text-align: center;
}

/* ==========================================================================
   Reveal-on-scroll utility
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__logo { order: -1; max-width: 200px; margin: 0 auto 12px; }
  .research-grid,
  .research-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .pi-card { grid-template-columns: 1fr; text-align: center; }
  .pi-card__photo { max-width: 220px; margin: 0 auto; }
  .pi-card__links, .pi-card__status { justify-content: center; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    box-shadow: var(--shadow-med);
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 25;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .nav-links a { padding: 13px 16px; }
  .nav-toggle { display: block; }

  .mocha-grid { flex-direction: column; gap: 26px; }
  .mocha-card { padding: 0; }
  .mocha-card:not(:last-child)::after { display: none; }
  .research-grid,
  .research-grid.cols-5 { grid-template-columns: 1fr; }
  .roster-grid { grid-template-columns: 1fr; }
  .callout { flex-direction: column; text-align: center; padding: 36px 24px; }
  .callout__text { max-width: 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  section { padding: 52px 0; }
}
