:root {
  --bg: #f8f7f3;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #5f6b7a;
  --line: #d9ded8;
  --accent: #2f5d62;
  --accent-2: #b86b4b;
  --soft: #e8efec;
  --shadow: 0 20px 50px rgba(31, 41, 51, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 247, 243, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-size: 1.15rem;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.94rem;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 78px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 360px;
  align-items: center;
  gap: 56px;
  min-height: calc(100vh - 68px);
}

.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0 0 14px;
}

h1, h2, h3 {
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
h3 { font-size: 1.25rem; }

.lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--muted);
  max-width: 760px;
}

.button-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 12px 24px rgba(47, 93, 98, 0.20);
}

.button:hover { text-decoration: none; transform: translateY(-1px); }
.button.ghost { background: transparent; color: var(--accent); box-shadow: none; }

.profile-card, .contact-box, .card, .diagram-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 30px;
  text-align: center;
}

.photo-frame {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, var(--soft), #f5eee8);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 3rem;
  font-weight: 850;
  color: var(--accent);
}

.muted { color: var(--muted); }
.todo {
  color: var(--accent-2);
  font-weight: 700;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 42px;
  align-items: center;
}

.notice {
  padding: 18px 20px;
  border-left: 4px solid var(--accent-2);
  background: #fff8f4;
  border-radius: 14px;
  color: #5c4035;
}

.diagram-panel {
  padding: 16px;
}

.chain-diagram {
  width: 100%;
  height: auto;
  display: block;
}

.svg-bg { fill: #fbfcfa; stroke: var(--line); }
.svg-title { font-size: 26px; font-weight: 800; fill: var(--ink); }
.svg-small { font-size: 18px; fill: var(--muted); font-weight: 700; }
.bond { stroke: var(--accent); stroke-width: 8; stroke-linecap: round; opacity: 0.55; }
.site { fill: var(--soft); stroke: var(--accent); stroke-width: 5; }
.site-label { font-size: 23px; font-weight: 850; fill: var(--accent); }
.measurement { stroke: var(--accent-2); stroke-width: 5; stroke-linecap: round; fill: none; }
.feedback { stroke: var(--accent-2); stroke-width: 5; stroke-dasharray: 10 9; fill: none; }
.unitary-box { fill: #f4eee7; stroke: var(--accent-2); stroke-width: 3; }
.unitary-text { font-size: 26px; font-weight: 850; fill: var(--accent-2); }
marker path { fill: var(--accent-2); }

.cards-section { padding-top: 34px; }
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.card { padding: 24px; }
.card h3 { color: var(--accent); }

.section-intro {
  color: var(--muted);
  max-width: 760px;
}

.timeline {
  display: grid;
  gap: 20px;
  margin-top: 34px;
}

.entry {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.entry-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 850;
  box-shadow: 0 10px 18px rgba(47, 93, 98, 0.22);
}

.entry-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
}

.empty-entry .entry-marker { background: var(--accent-2); }

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  align-items: start;
}

.contact-box { padding: 28px; }

.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 56px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .hero, .grid-two, .contact-section {
    grid-template-columns: 1fr;
  }
  .profile-card { max-width: 430px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 16px 0; }
  .nav-links { justify-content: flex-start; }
  .section { padding: 54px 0; width: min(100% - 28px, 1120px); }
  .cards { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entry-marker { margin-left: 4px; }
}
