/* ---------- Design tokens ---------- */
:root {
  --charcoal: #38352f;
  --charcoal-soft: #46423b;
  --cream: #f4f0e8;
  --cream-dim: #e4ddd0;
  --terracotta: #b98a70;
  --terracotta-dark: #a3745b;
  --ink: #2a2824;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", "Segoe UI", sans-serif;

  --container: 1140px;
  --radius: 4px;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--charcoal);
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--terracotta-dark);
  margin-bottom: 0.6em;
}

#chi-sono .col-text p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.note {
  font-style: italic;
  font-size: 0.92rem;
  color: #5c5850;
  border-left: 2px solid var(--terracotta);
  padding-left: 1em;
}
.note.center {
  text-align: center;
  border-left: none;
  border-top: 2px solid var(--terracotta);
  padding: 1em 0 0;
  max-width: 640px;
  margin: 2.5em auto 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding: 0.85em 1.8em;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--terracotta);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.btn-ghost {
  border-color: rgba(244,240,232,0.5);
  color: inherit;
}
.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.8em;
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
}
.cv-link::before {
  content: "\2193";
  font-weight: 700;
}
.cv-link:hover {
  background: var(--terracotta);
  color: var(--cream);
}
.hero .btn-ghost { color: var(--cream); }
.btn-ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(56, 53, 47, 0.92);
  backdrop-filter: blur(6px);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(0,0,0,0.25); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.brand-mark.small { width: 34px; height: 34px; font-size: 1.05rem; margin-right: 8px; vertical-align: middle; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.brand-role { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream-dim); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition);
}
.primary-nav a:hover { color: var(--terracotta); }
.primary-nav a.nav-cta {
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta);
  padding: 0.5em 1.2em;
  border-radius: var(--radius);
}
.primary-nav a.nav-cta:hover { background: var(--terracotta); color: var(--charcoal); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cream);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--charcoal) 0%, var(--charcoal-soft) 100%);
  color: var(--cream);
  padding: 190px 0 110px;
}
.hero-inner { max-width: 760px; }
.hero .eyebrow { color: var(--terracotta); }
.hero h1 { color: var(--cream); }
.hero h1 em { color: var(--terracotta); font-style: italic; }
.hero-lead {
  font-size: 1.1rem;
  color: var(--cream-dim);
  max-width: 600px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 2em;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--cream-dim); }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}
.two-col > * { min-width: 0; }
/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 2.5em 0 0;
  padding: 0;
  max-width: 760px;
  border-left: 2px solid rgba(185,138,112,0.35);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 2.2em 28px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px; top: 0.3em;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--terracotta);
  border: 2px solid var(--cream-dim);
}
.timeline-year {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--terracotta-dark);
  font-size: 0.95rem;
}
.timeline h3 { margin-bottom: 0.3em; font-size: 1.05rem; }
.timeline p { margin: 0; font-size: 0.92rem; color: #4d493f; }

@media (max-width: 560px) {
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

.col-media img {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(42,40,36,0.18);
}

.qualifications {
  list-style: none;
  padding: 0;
  margin: 1.6em 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.qualifications li {
  position: relative;
  padding-left: 26px;
  font-weight: 500;
  color: var(--charcoal);
}
.qualifications li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--terracotta);
}

/* ---------- Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 2.5em;
}
.card {
  background: var(--cream);
  border: 1px solid rgba(56,53,47,0.08);
  border-top: 3px solid var(--terracotta);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(42,40,36,0.12);
}
.card h3 { margin-bottom: 0.5em; }
.card p { margin: 0; color: #4d493f; font-size: 0.95rem; }

/* ---------- Modes ---------- */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 2.5em;
}
.mode { text-align: center; padding: 0 12px; }
.mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--terracotta);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 1em;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 2.5em;
}
.gallery img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(42,40,36,0.16);
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.8em 0 2em;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.contact-list li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-list a { overflow-wrap: break-word; }
.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terracotta-dark);
  font-weight: 600;
}
.contact-list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.contact-list a:hover { color: var(--terracotta-dark); }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(42,40,36,0.18);
  min-height: 340px;
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: var(--cream-dim);
  padding: 40px 0;
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-inner div { display: flex; align-items: center; }
.footer-inner p { margin: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .col-media { order: -1; }
  .gallery { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--charcoal);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    transform: translateY(-130%);
    transition: transform var(--transition);
  }
  .primary-nav.open { transform: translateY(0); }
  .hero { padding: 150px 0 80px; }
  .section { padding: 72px 0; }
}
