:root {
  --paper: #faf9f4;
  --paper-line: #d9dfd3;
  --ink: #1f2a24;
  --ink-soft: #56605a;
  --fir: #2f5233;
  --fir-deep: #203a24;
  --rust: #b8531f;
  --rust-soft: #e8d9cc;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 20;
  color: var(--fir-deep);
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: var(--fir); }

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

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 20;
  font-size: 1.15rem;
  color: var(--fir-deep);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover { border-bottom-color: var(--paper-line); }
.nav-links a[aria-current="page"] { color: var(--fir-deep); border-bottom-color: var(--rust); }

.nav-cta {
  display: inline-block;
  padding: 9px 18px;
  border: 1.5px solid var(--fir);
  border-radius: 3px;
  color: var(--fir-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--fir); color: var(--paper); }

/* ---------- Hero (home) ---------- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 28px 80px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1.08;
}

.hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero-ctas {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 13px 26px;
  background: var(--rust);
  color: #fff8f2;
  text-decoration: none;
  border-radius: 3px;
  font-weight: 600;
  font-size: 1rem;
}

.btn-secondary {
  display: inline-block;
  padding: 13px 26px;
  color: var(--fir-deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 1.5px solid var(--fir);
}

.hero-figure { width: 100%; }
.hero-figure svg { width: 100%; height: auto; display: block; }

/* ---------- Page header (interior pages) ---------- */

.page-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 28px 56px;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
}

.page-header p {
  margin-top: 16px;
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

/* ---------- Section shell ---------- */

section { padding: 68px 0; }
.divider { border: none; border-top: 1px solid var(--paper-line); }

.section-head {
  max-width: 60ch;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: 1.9rem;
}

.section-head p {
  margin-top: 14px;
  color: var(--ink-soft);
  max-width: 56ch;
}

.section-head a.more { font-weight: 600; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
}

.about-copy p {
  max-width: 62ch;
  margin: 0 0 18px;
}

.about-copy p:first-child {
  font-size: 1.1rem;
}

.credentials {
  border-left: 2px solid var(--fir);
  padding-left: 22px;
}

.credentials h3 {
  font-size: 1rem;
  color: var(--ink-soft);
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  text-transform: none;
  margin-bottom: 12px;
}

.credentials ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.credentials li {
  padding: 10px 0;
  border-top: 1px solid var(--paper-line);
  font-size: 0.98rem;
  color: var(--ink);
}

.credentials li:first-of-type { border-top: none; }

/* ---------- Bio page (About page long-form) ---------- */

.bio-body p {
  max-width: 68ch;
  margin: 0 0 20px;
  font-size: 1.05rem;
}

.bio-body p:first-child { font-size: 1.15rem; }

.bio-placeholder {
  background: var(--rust-soft);
  border-left: 3px solid var(--rust);
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 0.95rem;
  color: var(--ink);
  max-width: 68ch;
}

.bio-photo {
  margin: 28px 0;
  max-width: 420px;
}

.bio-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.bio-photo.bio-photo-wide {
  max-width: 68ch;
}

.bio-photo figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.philosophy-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.philosophy-list li {
  border-top: 2px solid var(--fir);
  padding-top: 14px;
}

.philosophy-list h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.philosophy-list p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.97rem;
}

/* ---------- Subjects (transcript style) ---------- */

.transcript {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}

.transcript-col h3 {
  font-size: 0.85rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  color: var(--fir);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--fir);
  margin-bottom: 4px;
}

.transcript-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.transcript-col li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--paper-line);
  font-size: 1rem;
}

.transcript-col li span.tag {
  color: var(--ink-soft);
  font-size: 0.85rem;
  white-space: nowrap;
  padding-top: 2px;
}

/* ---------- Subject grid (homepage "What I tutor") ---------- */

.subject-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--paper-line);
  border-left: 1px solid var(--paper-line);
}

.subject-grid li {
  border-right: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  padding: 20px 22px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  position: relative;
  transition: background 0.15s ease;
}

.subject-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--rust);
  transform: scaleY(0);
  transition: transform 0.15s ease;
}

.subject-grid li:hover { background: var(--rust-soft); }
.subject-grid li:hover::before { transform: scaleY(1); }

/* ---------- Subject detail list (Subjects page) ---------- */

.subject-detail {
  border-top: 1px solid var(--paper-line);
  padding: 26px 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.subject-detail:last-child { border-bottom: 1px solid var(--paper-line); }

.subject-detail h3 {
  font-size: 1.15rem;
}

.subject-detail .level-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--fir);
  font-weight: 600;
}

.subject-detail p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- How it works ---------- */

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

.step {
  padding-top: 18px;
  border-top: 2px solid var(--fir);
}

.step .num {
  font-family: 'Fraunces', serif;
  font-optical-sizing: none;
  font-variation-settings: 'opsz' 20;
  font-size: 1.5rem;
  color: var(--rust);
  display: block;
  margin-bottom: 10px;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}

/* ---------- Service area ---------- */

.area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.area-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.area-list li {
  font-size: 0.95rem;
  color: var(--fir-deep);
  background: var(--rust-soft);
  padding: 6px 14px;
  border-radius: 999px;
}

.area-map svg { width: 100%; height: auto; display: block; }

/* ---------- Contact ---------- */

.contact {
  background: var(--fir-deep);
  color: #eef2ea;
  padding: 72px 0;
  margin-top: 20px;
}

.contact h1, .contact h2 {
  color: #fff;
}

.contact h2 { font-size: 2rem; }

.contact > .wrap > p, .contact-intro {
  color: #cfd9c9;
  max-width: 52ch;
  margin-top: 14px;
}

.contact-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-detail dt {
  font-size: 0.85rem;
  color: #9fb096;
  margin-bottom: 4px;
}

.contact-detail dd {
  margin: 0 0 24px;
  font-size: 1.15rem;
}

.contact-detail dd a { color: #fff; text-decoration: none; border-bottom: 1.5px solid var(--rust); }

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

form label {
  font-size: 0.88rem;
  color: #cfd9c9;
  margin-bottom: 4px;
  display: block;
}

form input, form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #3f5a44;
  background: #24402a;
  color: #fff;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.98rem;
}

form input:focus, form textarea:focus {
  outline: 2px solid var(--rust);
  outline-offset: 1px;
}

form button {
  margin-top: 6px;
  align-self: flex-start;
  padding: 12px 26px;
  background: var(--rust);
  color: #fff8f2;
  border: none;
  border-radius: 3px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

form button:disabled {
  opacity: 0.7;
  cursor: default;
}

.form-message {
  margin: 4px 0 0;
  font-size: 0.92rem;
  min-height: 1.3em;
}

.form-message.success { color: #bfe3c2; }
.form-message.error { color: #f0bd94; }

footer {
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .hero, .about, .transcript, .steps, .area, .contact-grid, .philosophy-list, .subject-detail {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 10px; gap: 32px; }
  .hero-figure { order: -1; }
  .transcript { gap: 28px; }
  .credentials { border-left: none; padding-left: 0; border-top: 2px solid var(--fir); padding-top: 20px; }
}
