/* ── François-Marie Tardo Dino — Academic Site ── */
/* Palette: Yunnan terracotta, tea green, ink black, warm paper */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #1a1714;
  --paper: #f5f0e8;
  --paper-dark: #ebe4d8;
  --terracotta: #b85c38;
  --terracotta-light: #d4896b;
  --tea: #5a7247;
  --tea-light: #7d9a68;
  --mist: #8b9a8e;
  --stone: #6b6560;
  --gold: #c9a84c;
  --white: #fefcf8;
  --shadow: rgba(26, 23, 20, 0.08);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── NAVIGATION ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 3px solid var(--terracotta);
  padding: 0 2rem;
}

nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

nav .nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.02em;
}

nav .nav-brand span { color: var(--terracotta-light); }

nav .nav-links { display: flex; gap: 0.25rem; }

nav .nav-links a {
  color: rgba(245, 240, 232, 0.7);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  transition: all 0.25s ease;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--paper);
  background: rgba(184, 92, 56, 0.3);
}

nav .nav-links a.active {
  background: var(--terracotta);
}

/* Hamburger */
nav .hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
nav .hamburger span {
  width: 24px;
  height: 2px;
  background: var(--paper);
  transition: 0.3s;
}

@media (max-width: 860px) {
  nav .hamburger { display: flex; }
  nav .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    padding: 1rem 2rem;
    border-bottom: 3px solid var(--terracotta);
  }
  nav .nav-links.open { display: flex; }
  nav .nav-links a { padding: 0.7rem 0; }
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: saturate(0.7);
  transition: opacity 1.5s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,23,20,0.85) 0%, rgba(26,23,20,0.4) 50%, rgba(26,23,20,0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 4rem 3rem;
  animation: fadeUp 1s ease-out;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta-light);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--terracotta);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--paper);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--terracotta-light);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(245, 240, 232, 0.75);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--terracotta);
  color: var(--paper);
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.hero-cta:hover {
  background: var(--terracotta-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 92, 56, 0.35);
}
.hero-cta svg { transition: transform 0.3s; }
.hero-cta:hover svg { transform: translateX(3px); }

/* ── SECTIONS ── */
.section {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--terracotta);
  margin-bottom: 2rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.section p, .section-wide p {
  margin-bottom: 1.2rem;
  color: var(--stone);
  font-size: 1rem;
}

.section p strong { color: var(--ink); font-weight: 600; }

/* ── YUNNAN GALLERY ── */
.yunnan-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 3rem 0;
}

.yunnan-gallery .gallery-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: default;
}

.yunnan-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.yunnan-gallery .gallery-item:hover img {
  transform: scale(1.06);
}

.yunnan-gallery .gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 0.8rem;
  background: linear-gradient(transparent, rgba(26,23,20,0.8));
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.yunnan-gallery .gallery-item:hover .caption {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .yunnan-gallery { grid-template-columns: 1fr; }
}

/* ── BIO CARD ── */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
  align-items: start;
}

.bio-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.bio-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.bio-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 0.85rem;
}

.bio-item-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist);
  font-weight: 600;
}

.bio-item-value {
  font-size: 0.95rem;
  color: var(--ink);
  margin-top: 0.15rem;
}

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

/* ── CHAPTER CARDS ── */
.chapter-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.chapter-card {
  background: var(--white);
  border: 1px solid var(--paper-dark);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.35s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--terracotta-light);
}

.chapter-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--terracotta);
  line-height: 1;
  margin-bottom: 0.8rem;
}

.chapter-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.7rem;
  line-height: 1.3;
}

.chapter-card p {
  font-size: 0.88rem;
  color: var(--stone);
  line-height: 1.65;
  flex-grow: 1;
}

.chapter-card .card-link {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--terracotta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── MODEL PAGE LAYOUT ── */
.model-hero {
  background: var(--ink);
  padding: 3.5rem 2rem 3rem;
  border-bottom: 3px solid var(--terracotta);
}

.model-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.model-hero .chapter-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta-light);
  margin-bottom: 0.8rem;
}

.model-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--paper);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.model-hero p {
  color: rgba(245, 240, 232, 0.7);
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ── NOTICE BANNER ── */
.notice-banner {
  background: linear-gradient(135deg, #fdf6ec, #fef9f1);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.notice-banner .notice-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.notice-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--stone);
  line-height: 1.6;
}

.notice-banner strong { color: var(--ink); }

/* ── FORM MOCKUP ── */
.model-interface {
  background: var(--white);
  border: 1px solid var(--paper-dark);
  border-radius: 8px;
  padding: 2.5rem;
  margin: 2rem 0;
}

.model-interface h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.model-interface .interface-desc {
  font-size: 0.88rem;
  color: var(--mist);
  margin-bottom: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.form-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stone);
  margin-bottom: 0.45rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--paper-dark);
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s;
  opacity: 0.55;
  cursor: not-allowed;
}

.form-group .full-width { grid-column: 1 / -1; }

.btn-disabled {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--mist);
  color: var(--paper);
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 5px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  cursor: not-allowed;
  margin-top: 1.5rem;
  opacity: 0.6;
}

/* ── METHODOLOGY LIST ── */
.method-list {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.method-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  background: var(--white);
  border-radius: 6px;
  border: 1px solid var(--paper-dark);
}

.method-bullet {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.method-item p { margin: 0; font-size: 0.92rem; }
.method-item strong { color: var(--ink); }

/* ── EQUATION BLOCK ── */
.equation-block {
  background: var(--ink);
  color: var(--paper);
  padding: 1.5rem 2rem;
  border-radius: 6px;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
  overflow-x: auto;
  border-left: 4px solid var(--terracotta);
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: rgba(245, 240, 232, 0.5);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.82rem;
  border-top: 3px solid var(--terracotta);
}

footer a {
  color: var(--terracotta-light);
  text-decoration: none;
}

footer .footer-inner {
  max-width: 860px;
  margin: 0 auto;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

footer .footer-links a {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 0.2s;
}

footer .footer-links a:hover { color: var(--paper); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESEARCH PAGE SPECIFICS ── */
.research-body p {
  font-size: 1.02rem;
  line-height: 1.78;
  color: #4a4540;
}

.research-body p + p { margin-top: 0.3rem; }

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.keyword-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  background: rgba(184, 92, 56, 0.1);
  color: var(--terracotta);
  border: 1px solid rgba(184, 92, 56, 0.2);
}

/* ── BACK LINK ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--terracotta);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: gap 0.2s;
}
.back-link:hover { gap: 0.7rem; }

/* ── Utility ── */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
