/* Damian Mikhail portfolio. Static, no build step. */

body { margin: 0; background: #ffffff; }
a { color: #254125; text-underline-offset: 3px; }
a:hover { color: #111c11; }

/* Page wrappers */
.page {
  background: #ffffff;
  color: #1b1b1b;
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 28px 24px 48px;
}
.page--case { font-size: 17px; line-height: 1.65; }
.wrap {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 72px;
}
.page--case .wrap { gap: 56px; }

/* Shared type */
.serif { font-family: Newsreader, Georgia, serif; }
h1, h2, h3, p, ul, figure { margin: 0; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1b1b1b;
}
.site-header .home-link {
  font-family: Newsreader, Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 15px;
}

/* Placeholders for photo and screenshots */
.placeholder {
  background: #f3f3f3;
  border: 1px solid #d6d6d6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #595959;
  font-size: 13px;
  text-align: center;
}
.placeholder--16x7 { aspect-ratio: 16 / 7; }
.placeholder--16x9 { aspect-ratio: 16 / 9; }
.placeholder--4x3 { aspect-ratio: 4 / 3; }

/* Home: intro */
.intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
}
.intro .photo { width: 184px; height: 184px; flex: 0 0 184px; object-fit: cover; display: block; }
.intro-text {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.intro h1 {
  font-family: Newsreader, Georgia, serif;
  font-size: 68px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.intro .role { font-size: 20px; color: #1b1b1b; }
.intro .bio { font-size: 17px; color: #3a3a3a; }

/* Home: projects */
.projects { display: flex; flex-direction: column; gap: 56px; }
.project { display: flex; flex-direction: column; gap: 28px; }
.project--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: start;
  padding-top: 56px;
  border-top: 1px solid #e4e4e4;
}
.project-body { display: flex; flex-direction: column; gap: 14px; }
.project-body--wide { max-width: 680px; }
.project h3 {
  font-family: Newsreader, Georgia, serif;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
}
.figure-line { font-weight: 600; }
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}
.tools { font-size: 14px; color: #595959; }
.project-links { display: flex; gap: 24px; font-weight: 600; }

/* Tables */
.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
.facts caption,
.data-table caption {
  text-align: left;
  font-size: 13px;
  color: #595959;
  padding-bottom: 6px;
}
.facts th, .facts td {
  padding: 7px 0;
  border-bottom: 1px solid #e4e4e4;
  text-align: left;
}
.facts th { font-weight: 400; }
.facts td { text-align: right; white-space: nowrap; padding-left: 16px; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table--wide { min-width: 560px; }
.data-table--narrow { min-width: 520px; }
.data-table th, .data-table td {
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid #e4e4e4;
  text-align: left;
  vertical-align: top;
}
.data-table th[scope="row"] { font-weight: 400; }

/* Home: about */
.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 40px;
  border-top: 1px solid #1b1b1b;
}
.about p { max-width: 720px; }
@media (min-width: 800px) {
  .about {
    grid-template-columns: 240px minmax(0, 720px);
    column-gap: 40px;
  }
  .about h2 { grid-row: 1 / span 2; }
}
.about h2, .section h2, .section-narrow h2 {
  font-family: Newsreader, Georgia, serif;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 1px solid #e4e4e4;
  font-size: 14px;
  color: #595959;
}

/* Case study */
.case-head { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.case-head .back { font-size: 15px; }
.case-head h1 {
  font-family: Newsreader, Georgia, serif;
  font-size: 48px;
  line-height: 1.1;
  font-weight: 500;
}
.case-head .stack { font-size: 15px; color: #595959; }

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid #1b1b1b;
  border-bottom: 1px solid #1b1b1b;
}

.section-narrow { max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.section { display: flex; flex-direction: column; gap: 18px; }
.section .text { max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.section .after { max-width: 720px; }
.section figure { display: flex; flex-direction: column; gap: 8px; }
.section figcaption { font-size: 14px; color: #595959; }
.bullets {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section .bullets { max-width: 720px; }

/* Screenshots */
.shot { display: block; width: 100%; height: auto; border: 1px solid #e4e4e4; }
.shot-link { display: block; }


/* Click to enlarge */
.shot-caption { display: block; margin-top: 6px; font-size: 13px; color: #595959; }
.shot-link { cursor: zoom-in; }
.lightbox {
  border: 0; padding: 0; background: #ffffff;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  overflow: auto;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox img { display: block; max-width: 100%; max-height: 100vh; margin: 0 auto; cursor: zoom-out; }
.lightbox-close {
  position: fixed; top: 12px; right: 12px;
  font: inherit; font-size: 14px; color: #254125;
  background: #ffffff; border: 1px solid #1b1b1b; padding: 6px 12px; cursor: pointer;
}
.shot--chart { max-width: 720px; }
