/* Universal Box Model */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #18211f;
  background: #f7f5ef;
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Full-Width Grid Navigation */
.header {
  width: 100%;
  padding: 12px 2vw;
  border-bottom: 1px solid #dedbd1;
  background: rgba(247, 245, 239, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
}

/* Fix logo size so the remaining links take up the rest of the row */
.logo {
  flex-shrink: 0;
  padding: 12px 18px;
  font-weight: bold;
  text-decoration: none;
  border: 1px solid #18211f;
  border-radius: 6px;
  background: #f7f5ef;
}

/* Distribute the boxes dynamically across the entire row */
.nav-links {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr); /* Forces all boxes to expand equally */
  gap: 8px;
  width: 100%;
}

/* Box styling for each link */
.nav-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #18211f;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

/* Hover effect */
.nav-box:hover {
  background-color: #18211f;
  color: #ffffff;
  border-color: #18211f;
}

/* Mobile Responsiveness: Stack boxes into a grid on smaller screens */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
  }

  .nav-links {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
  }
}

/* Site Sections & Layout */
.eyebrow,
.section-label,
.tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #66736d;
}

.hero {
  min-height: 720px;
  padding: 90px 8vw 100px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8vw;
  align-items: center;
  background: linear-gradient(135deg, #f7f5ef 55%, #dce7df);
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.98;
  margin: 18px 0 28px;
  letter-spacing: -0.04em;
}

.hero h1 em {
  font-weight: 600;
  color: #47705f;
}

.hero-text {
  font-size: 19px;
  max-width: 600px;
  color: #53605b;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.primary {
  background: #18211f;
  color: white;
}

.secondary {
  border: 1px solid #bfc5bf;
}

.light {
  background: #f7f5ef;
  color: #18211f;
}

.hero-card {
  min-height: 500px;
  border-radius: 28px;
  background: #c6d6cd;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  transform: rotate(2deg);
}

.portrait-placeholder {
  flex: 1;
  display: grid;
  place-items: center;
  font-family: "Playfair Display", serif;
  font-size: 160px;
  color: #47705f;
  border: 1px solid rgba(24, 33, 31, 0.18);
  border-radius: 20px;
  background: #dce7df;
}

.hero-note {
  padding: 18px 5px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.hero-note span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-note strong {
  max-width: 220px;
}

.section {
  padding: 120px 8vw;
}

.section-label {
  margin-bottom: 28px;
}

.section h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
}

.section p {
  color: #5c6762;
}

.about {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 8vw;
}

.lead {
  font-size: 23px !important;
  max-width: 760px;
  color: #2d3934 !important;
}

.text-link {
  font-weight: 700;
  border-bottom: 1px solid #839087;
  padding-bottom: 2px;
  display: inline-block;
  margin-top: 12px;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 48px;
}

.books {
  background: #eeece5;
}

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

.book-card {
  background: #f7f5ef;
  border: 1px solid #ddd9cf;
  border-radius: 20px;
  overflow: hidden;
}

.book-cover {
  height: 350px;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 26px;
  letter-spacing: 0.08em;
}

.cover-one {
  background: linear-gradient(145deg, #28483e, #6e947f);
}

.cover-two {
  background: linear-gradient(145deg, #493b57, #9b789d);
}

.cover-three {
  background: linear-gradient(145deg, #4a5445, #9aa56f);
}

.book-info {
  padding: 25px;
}

.book-info h3,
.post-card h3,
.timeline h3 {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  margin: 8px 0;
}

.writing {
  background: #18211f;
  color: #f7f5ef;
}

.writing .section-label,
.writing .section-heading p,
.writing .post-card p {
  color: #b9c4be;
}

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

.post-card {
  border: 1px solid #394641;
  padding: 28px;
  border-radius: 18px;
  min-height: 280px;
}

.post-card h3 {
  font-size: 25px;
}

.post-card .text-link {
  color: #f7f5ef;
  border-color: #687770;
}

.tutoring {
  background: #dce7df;
}

.tutor-panel {
  max-width: 1100px;
  margin: auto;
  background: #47705f;
  color: #fff;
  border-radius: 28px;
  padding: 55px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 45px;
}

.tutor-panel h2 {
  margin-bottom: 14px;
}

.tutor-panel p {
  color: #d9e5de;
}

.tutor-points {
  display: grid;
  gap: 0;
}

.tutor-points div {
  display: flex;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 18px 0;
}

.tutor-points strong {
  font-size: 12px;
  color: #b9d1c4;
}

.projects {
  background: #f7f5ef;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #cfcac0;
}

.timeline > div {
  padding: 30px 25px 10px 0;
  border-right: 1px solid #cfcac0;
  margin-right: 25px;
}

.timeline span {
  font-size: 12px;
  font-weight: 700;
  color: #7a867f;
}

.contact {
  background: #d7e0da;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  align-items: end;
}

.contact-card {
  background: #f7f5ef;
  border-radius: 20px;
  padding: 32px;
}

.contact-card a {
  font-size: 18px;
  font-weight: 700;
  word-break: break-word;
}

.small {
  font-size: 12px !important;
  margin-bottom: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd9cf;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: #18211f;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
}

footer {
  padding: 35px 8vw;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  background: #18211f;
  color: #d7dfda;
  font-size: 13px;
}

footer div {
  display: flex;
  gap: 15px;
}

footer span {
  color: #829089;
}

/* Mobile Adjustments for General Layout */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 70px 6vw;
  }
  .hero-card {
    min-height: 380px;
  }
  .section {
    padding: 80px 6vw;
  }
  .about,
  .contact,
  .tutor-panel {
    grid-template-columns: 1fr;
  }
  .book-grid,
  .post-grid,
  .timeline {
    grid-template-columns: 1fr;
  }
  .timeline > div {
    border-right: 0;
    border-bottom: 1px solid #cfcac0;
    margin: 0;
    padding-bottom: 25px;
  }
  .tutor-panel {
    padding: 35px 25px;
  }
  footer {
    padding: 30px 6vw;
    flex-direction: column;
  }
  footer div {
    flex-direction: column;
    gap: 3px;
  }
  .hero h1 {
    font-size: 56px;
  }
}
