/* -------------------------------------------------------------
   Sam Bysh — personal site
   Palette: sage-grey ground, dusky pink sidebar, sage accent
   Nav/labels: Helvetica; body/headings: Baskerville
   ------------------------------------------------------------- */

:root {
  --bg: #d8ddd4;
  --sidebar-bg: #d9bdb9;
  --accent: #5b6b4f;
  --text: #24261f;
  --sub: #6d7268;
  --photo-bg: #c9c2a8;
  --rule: #b9c0af;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

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

a:hover {
  color: var(--text);
}

.serif {
  font-family: Baskerville, 'Times New Roman', Georgia, serif;
}

.page {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

/* ---------------- sidebar ---------------- */

.sidebar {
  flex: 0 0 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: var(--sidebar-bg);
  border-radius: 4px;
  padding: 22px 8px;
  position: sticky;
  top: 32px;
}

.sidebar .photo {
  width: 62px;
  height: 62px;
  border-radius: 4px;
  background: var(--photo-bg);
  border: 1px solid rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sub);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.sidebar .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar nav a {
  writing-mode: vertical-rl;
  text-decoration: none;
  color: var(--text);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar nav a:hover {
  color: var(--accent);
}

.sidebar nav a.current {
  color: var(--text);
}

.sidebar nav a.current::before {
  content: '\25CF\A0';
  color: var(--accent);
  font-size: 8px;
  white-space: pre;
}

/* ---------------- content ---------------- */

.content {
  flex: 1;
  min-width: 0;
}

.content h1 {
  font-family: Baskerville, 'Times New Roman', Georgia, serif;
  font-weight: normal;
  font-size: 36px;
  margin: 0 0 4px;
}

.eyebrow {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--sub);
  margin-bottom: 28px;
}

.content p {
  font-family: Baskerville, 'Times New Roman', Georgia, serif;
  font-size: 17px;
  line-height: 1.68;
  max-width: 620px;
  margin: 0 0 18px;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 8px;
}

.bio-photo {
  flex-shrink: 0;
  width: 130px;
  height: 160px;
  border-radius: 2px;
  background: var(--photo-bg);
  border: 1px solid rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sub);
  font-size: 10px;
  text-transform: uppercase;
}

.bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------------- CV / section blocks ---------------- */

h2.section-title {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sub);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  margin: 40px 0 18px;
}

h2.section-title:first-of-type {
  margin-top: 0;
}

.entry {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  max-width: 680px;
}

.entry .when {
  flex: 0 0 60px;
  font-size: 13px;
  color: var(--sub);
  padding-top: 3px;
}

.entry .what {
  font-family: Baskerville, 'Times New Roman', Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
}

.entry .what .detail {
  display: block;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12.5px;
  color: var(--sub);
  margin-top: 2px;
}

details.also {
  margin-top: 44px;
  max-width: 640px;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

details.also summary {
  cursor: pointer;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sub);
}

details.also p {
  margin-top: 16px;
  font-size: 15.5px;
}

.pdf-link {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------------- tutoring: module lists ---------------- */

.module-groups {
  max-width: 680px;
  margin: 8px 0 32px;
}

.module-group {
  margin-bottom: 16px;
  font-size: 15.5px;
  line-height: 1.55;
}

.module-group .inst {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.module-group .mods {
  font-family: Baskerville, 'Times New Roman', Georgia, serif;
  color: var(--sub);
}

details.modules-full {
  max-width: 780px;
  margin: 8px 0 32px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}

details.modules-full summary {
  cursor: pointer;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sub);
}

table.module-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 16px;
  font-size: 14px;
}

table.module-table caption {
  text-align: left;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin: 18px 0 6px;
}

table.module-table th,
table.module-table td {
  text-align: left;
  padding: 5px 14px 5px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

table.module-table th {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: normal;
  color: var(--sub);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  table.module-table {
    font-size: 13px;
  }
  table.module-table th,
  table.module-table td {
    padding: 5px 8px 5px 0;
  }
}

/* ---------------- misc content elements ---------------- */

ul.plain {
  font-family: Baskerville, 'Times New Roman', Georgia, serif;
  font-size: 16px;
  line-height: 1.65;
  max-width: 620px;
  padding-left: 20px;
}

.contact-block {
  font-size: 17px;
  margin-bottom: 32px;
}

form.contact-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

form.contact-form label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sub);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

form.contact-form input,
form.contact-form textarea {
  font-family: Baskerville, 'Times New Roman', Georgia, serif;
  font-size: 15px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: #fff;
  color: var(--text);
}

form.contact-form button {
  align-self: flex-start;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: #fdfdfa;
  border: none;
  padding: 10px 22px;
  border-radius: 2px;
  cursor: pointer;
}

form.contact-form button:hover {
  opacity: 0.9;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

#form-status {
  font-size: 14px;
  min-height: 1.2em;
  margin: 4px 0 0;
}

#form-status.form-status-ok {
  color: var(--accent);
}

#form-status.form-status-error {
  color: #a8542f;
}

footer.sitefoot {
  margin-top: 56px;
  font-size: 12px;
  color: var(--sub);
}

/* ---------------- mobile ---------------- */

@media (max-width: 640px) {
  .page {
    flex-direction: column;
    gap: 24px;
    padding: 28px 20px 60px;
  }

  .sidebar {
    flex-direction: row;
    width: 100%;
    position: static;
    gap: 18px;
  }

  .sidebar .photo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }

  .sidebar nav a {
    writing-mode: horizontal-tb;
  }

  .top-row {
    flex-direction: column-reverse;
  }

  .bio-photo {
    width: 100%;
    height: 200px;
  }

  .content h1 {
    font-size: 30px;
  }

  .entry {
    flex-direction: column;
    gap: 2px;
  }

  .entry .when {
    padding-top: 0;
  }
}
