:root {
  --paper: #f7f1df;
  --ink: #201e1d;
  --ink-soft: #5f5b53;
  --night: #151617;
  --night-2: #222326;
  --chalk: #f7f3e8;
  --line: rgba(32, 30, 29, 0.16);
  --red: #b83b32;
  --gold: #c99132;
  --green: #2f8065;
  --blue: #3a5d91;
  --shadow: 0 18px 40px rgba(14, 15, 17, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(32, 30, 29, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(32, 30, 29, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: var(--chalk);
  background: rgba(21, 22, 23, 0.94);
  border-bottom: 1px solid rgba(247, 243, 232, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--night);
  background: var(--gold);
  border: 2px solid #f1c15d;
  border-radius: 8px;
  box-shadow: inset 0 -5px rgba(0, 0, 0, 0.13);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

nav a {
  padding: 9px 12px;
  color: rgba(247, 243, 232, 0.78);
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 8px;
}

nav a:hover,
nav a:focus-visible {
  color: var(--chalk);
  background: rgba(247, 243, 232, 0.1);
  outline: none;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: end;
  gap: 24px;
  padding: 54px 0 22px;
}

.intro-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 5.4vw, 5.15rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
  letter-spacing: 0;
}

.intro p:not(.eyebrow),
.booking-strip p,
.sources li,
.dialog-summary {
  color: var(--ink-soft);
  line-height: 1.65;
}

.intro p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 1.08rem;
}

.notice {
  display: grid;
  gap: 8px;
  padding: 18px;
  color: var(--chalk);
  background:
    linear-gradient(135deg, rgba(184, 59, 50, 0.22), transparent 56%),
    var(--night);
  border: 1px solid rgba(247, 243, 232, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notice span {
  color: #f1c15d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.notice strong {
  font-size: 1.8rem;
}

.notice small {
  color: rgba(247, 243, 232, 0.68);
  line-height: 1.5;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px);
  align-items: end;
  gap: 14px;
  margin: 18px 0 26px;
  padding: 14px;
  background: rgba(255, 253, 245, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-box,
.sort-box,
.booking-dialog label,
.form-panel label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid rgba(32, 30, 29, 0.2);
  border-radius: 8px;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(47, 128, 101, 0.3);
  outline-offset: 2px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
}

.secondary-action,
.primary-action {
  min-height: 44px;
  padding: 0 16px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
}

.secondary-action {
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(32, 30, 29, 0.22);
}

.secondary-action:hover {
  background: rgba(32, 30, 29, 0.06);
}

.primary-action {
  color: var(--chalk);
  background: var(--green);
  border: 1px solid rgba(21, 22, 23, 0.16);
  box-shadow: inset 0 -3px rgba(0, 0, 0, 0.16);
}

.primary-action:hover {
  background: #276e57;
}

.tutor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-height: 540px;
}

.tutor-card {
  display: grid;
  grid-template-rows: 280px 1fr;
  overflow: hidden;
  background: #fffaf0;
  border: 1px solid rgba(32, 30, 29, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.portrait-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  background: #050505;
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rating {
  color: var(--red);
}

.card-body h3 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.card-body p {
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 8px;
  color: var(--night);
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(201, 145, 50, 0.18);
  border: 1px solid rgba(201, 145, 50, 0.36);
  border-radius: 999px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(32, 30, 29, 0.1);
}

.price {
  display: grid;
  gap: 2px;
}

.price strong {
  font-size: 1.15rem;
}

.price span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.booking-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 28px;
  margin: 34px 0;
  padding: 28px;
  color: var(--chalk);
  background:
    linear-gradient(90deg, rgba(47, 128, 101, 0.34), transparent 55%),
    var(--night);
  border: 1px solid rgba(247, 243, 232, 0.14);
  border-radius: 8px;
}

.booking-strip .eyebrow {
  color: #f1c15d;
}

.booking-strip p {
  margin-bottom: 0;
  color: rgba(247, 243, 232, 0.72);
}

.records-section {
  margin: 34px 0;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.record-card,
.form-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 253, 245, 0.84);
  border: 1px solid rgba(32, 30, 29, 0.16);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(14, 15, 17, 0.1);
}

.record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.record-head h3,
.record-head p,
.record-card p {
  margin-bottom: 0;
}

.record-head p,
.record-card small,
.record-card p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.record-time {
  color: var(--ink);
  font-weight: 800;
}

.tiny-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.review-card {
  min-height: 150px;
}

.booking-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid rgba(32, 30, 29, 0.24);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.booking-dialog::backdrop {
  background: rgba(14, 15, 17, 0.68);
}

.booking-dialog form {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 26px;
}

.booking-dialog h2 {
  padding-right: 46px;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  background: rgba(32, 30, 29, 0.06);
  border: 1px solid rgba(32, 30, 29, 0.16);
  border-radius: 8px;
  cursor: pointer;
}

.booking-dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 4px 0 0;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  color: var(--ink-soft);
  background: rgba(255, 253, 245, 0.72);
  border: 1px dashed rgba(32, 30, 29, 0.24);
  border-radius: 8px;
}

@media (max-width: 1040px) {
  .tutor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header,
  .section-heading,
  .booking-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    position: static;
  }

  nav {
    width: 100%;
  }

  nav a {
    flex: 1;
    text-align: center;
  }

  .intro,
  .toolbar,
  .booking-strip,
  .review-layout,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .tutor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  main {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .tutor-card {
    grid-template-rows: 260px 1fr;
  }

  .portrait-wrap {
    min-height: 260px;
  }

  .card-footer,
  .booking-dialog menu {
    align-items: stretch;
    flex-direction: column;
  }

  .card-footer button,
  .booking-dialog menu button {
    width: 100%;
  }
}
