/* Layout pass: one screen on desktop, no scroll. Typography and color come in the design pass. */

/* Newsreader (SIL Open Font License), self-hosted variable font */
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}

ul {
  list-style: none;
}

/* Links: dark forest green with a plain underline */
a {
  color: #1c3f27;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}

a:hover {
  color: #2e6b42;
}

/* Muted lines (Resume) stay gray until hovered */
.muted a {
  color: inherit;
}

.muted a:hover {
  color: #1c3f27;
}

/* Page: text on the left, project preview on the right */
.page {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(0, 1fr);
  gap: 56px;
  max-width: 1600px;
  min-height: 100vh;
  padding: 40px 56px;
  align-items: center;
}

/* Two-column rows: label on the left, content on the right */
.row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
}

.row + .row {
  margin-top: 24px;
}

.label {
  font-weight: 600;
}

.mobile-slot:empty {
  display: none;
}

.content p + p {
  margin-top: 8px;
}

.content .muted {
  color: #777;
}

.content .resume {
  margin-top: 8px;
}

.timeline li {
  display: grid;
  grid-template-columns: 52px 1fr;
}

.when {
  color: #777;
}

/* Inline lists separated by a middle dot */
.inline {
  display: flex;
  flex-wrap: wrap;
}

.inline li {
  white-space: nowrap;
}

.inline li:not(:last-child)::after {
  content: "·";
  display: inline-block; /* keeps the dot out of the underline */
  padding: 0 8px;
  color: #999;
}

/* Projects: hover or tap to preview on the right */
.project {
  cursor: pointer;
  outline: none;
  color: #777;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}

.project:hover {
  color: #1c3f27;
}

.project {
  width: fit-content;
}

.project.is-active,
.project:focus-visible {
  color: #1c3f27;
}

/* Preview panel */
.preview video,
.media-empty {
  display: block;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  background: #f2f2f2;
  border: 1px solid #e5e5e5;
}

.media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 15px;
}

.desc {
  margin-top: 14px;
  max-width: 640px;
}

.links {
  margin-top: 8px;
  display: flex;
  gap: 20px;
  font-size: 15px;
  color: #555;
}

/* Small screens: stack everything and let the page scroll */
@media (max-width: 960px) {
  html,
  body {
    height: auto;
  }

  .page {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 32px;
    padding: 40px 24px 64px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .row + .row {
    margin-top: 28px;
  }

  .mobile-slot {
    margin-top: 16px;
  }
}
