:root {
  color-scheme: light;
  --background: #ffffff;
  --text: #222222;
  --muted: #666666;
  --rule: #dddddd;
  --link: #0645ad;
  --content-width: 900px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.container {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
}

.site-header {
  padding: 46px 0 28px;
  border-bottom: 1px solid var(--rule);
}

.intro {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  align-items: start;
}

.portrait {
  display: block;
  width: 150px;
  aspect-ratio: 1;
  object-fit: cover;
}

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

h1 {
  margin-bottom: 4px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 500;
}

.subtitle,
.location,
.section-note,
.meta,
.tools,
.photo-meta,
figcaption {
  color: var(--muted);
}

.subtitle {
  margin-bottom: 12px;
}

.status {
  margin-bottom: 4px;
  font-size: 14px;
}

.status strong {
  display: inline-block;
  min-width: 74px;
}

.main-nav,
.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.main-nav {
  margin-bottom: 28px;
}

.external-links {
  margin-top: 10px;
  font-size: 14px;
}

main {
  padding-bottom: 48px;
}

.page-section {
  padding: 42px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 20px;
}

.page-section h2 {
  margin-bottom: 4px;
  font-size: 25px;
  line-height: 1.3;
  font-weight: 500;
}

.section-note {
  margin-bottom: 26px;
  font-size: 14px;
}

.about {
  max-width: 720px;
}

.about p:last-child,
.job:last-child,
.project:last-child,
.model:last-child {
  margin-bottom: 0;
}

.job {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  margin-bottom: 34px;
}

.meta {
  font-size: 14px;
}

.meta p {
  margin-bottom: 2px;
}

.job h3,
.project h3,
.model h3,
.plain-group h3 {
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 600;
}

.job h3 span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.job ul,
.plain-list {
  margin: 0;
  padding-left: 20px;
}

.job li {
  margin-bottom: 8px;
}

.tools {
  margin: 10px 0 0;
  font-size: 13px;
}

.education-grid,
.two-column,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 44px;
}

.education,
.subsection {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.education h3 {
  margin-bottom: 3px;
  font-size: 16px;
}

.education .meta {
  margin-bottom: 8px;
}

.project,
.model {
  margin-bottom: 24px;
}

.project p,
.model p {
  margin-bottom: 5px;
}

.project-links {
  font-size: 14px;
}

.skills-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plain-group p,
.plain-group li {
  font-size: 14px;
}

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

.dated-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.dated-list time {
  flex: 0 0 auto;
  color: var(--muted);
}

.contact-layout {
  display: grid;
  grid-template-columns: 384px 1fr;
  gap: 24px;
}

.contact-form {
  width: 100%;
  min-height: 500px;
  border: 1px solid var(--rule);
}

.site-footer {
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

/* Astrophotography page */
.simple-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}

.gallery-intro {
  max-width: 680px;
  padding: 42px 0 28px;
}

.gallery-intro h1 {
  margin-bottom: 12px;
}

.gallery-intro p {
  margin-bottom: 10px;
}

.gallery-years {
  padding-bottom: 48px;
}

.year-group {
  margin-bottom: 44px;
}

.year-group:last-child {
  margin-bottom: 0;
}

.year-heading {
  margin: 0 0 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
  font-size: 19px;
  font-weight: 500;
}

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

.photo {
  margin: 0;
}

.photo a {
  display: block;
  background: #111111;
}

.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo figcaption {
  padding-top: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.photo figcaption strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.photo-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 28px;
  }

  .intro {
    grid-template-columns: 105px 1fr;
    gap: 18px;
  }

  .portrait {
    width: 105px;
  }

  h1 {
    font-size: 28px;
  }

  .status strong {
    display: block;
  }

  .job,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .container {
    width: min(calc(100% - 28px), var(--content-width));
  }

  .intro {
    display: block;
  }

  .portrait {
    width: 120px;
    margin-bottom: 16px;
  }

  .main-nav {
    gap: 6px 14px;
  }

  .page-section {
    padding: 34px 0;
  }

  .education-grid,
  .two-column,
  .skills-grid,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .dated-list li {
    display: block;
  }

  .simple-header {
    display: block;
  }

  .simple-header a+a {
    display: inline-block;
    margin-top: 6px;
  }
}