/* Martin Allers — Technical Artist
   Faithful static rebuild of the original Squarespace "Clarkson" portfolio.
   Type: Futura PT -> Jost (free geometric substitute); Proxima Nova -> Inter. */

:root {
  --ink: #222222;
  --muted: #777777;
  --line: #e6e6e6;
  --bg: #ffffff;
  --maxw: 1100px;
  --pad: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Header ---------- */
.site-header {
  padding: 48px 0 0;
}

.brand {
  text-decoration: none;
  display: inline-block;
}

.brand .logo {
  font-family: "Jost", "Futura PT", "Futura", sans-serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.1;
}

.brand .subtitle {
  font-family: "Jost", "Futura PT", "Futura", sans-serif;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- Nav ---------- */
.main-nav {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.main-nav a {
  font-family: "Jost", "Futura PT", sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, opacity .15s ease;
}

.main-nav a:hover { opacity: 0.6; }
.main-nav a.active { border-bottom-color: var(--ink); }

/* social icons */
.social {
  display: flex;
  gap: 14px;
  align-items: center;
}
.social a { display: inline-flex; opacity: .8; transition: opacity .15s ease; }
.social a:hover { opacity: 1; }
.social svg { width: 22px; height: 22px; fill: var(--ink); }

/* ---------- Main content ---------- */
main { padding: 56px 0 80px; }

.section-title {
  font-family: "Jost", "Futura PT", sans-serif;
  font-weight: 700;
  text-align: center;
  font-size: 30px;
  letter-spacing: 0.01em;
  margin: 0 0 36px;
}

.project { margin: 0 0 40px; }
.project a { display: block; }
.project img { width: 100%; }

.page-intro {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--muted);
}

.placeholder {
  max-width: 720px;
  margin: 40px auto;
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Gallery (Tools / School Projects) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.gallery-item {
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.gallery-item .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f3f3;
}

.gallery-item .thumb .hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.gallery-item:hover .thumb .hover-video { opacity: 1; }

.gallery-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.gallery-item:hover .thumb img { transform: scale(1.04); }

.gallery-item .title {
  font-family: "Jost", "Futura PT", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin-top: 14px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-grid .portrait img { width: 100%; }
.about-grid h1 {
  font-family: "Jost", "Futura PT", sans-serif;
  font-weight: 700;
  font-size: 34px;
  margin: 0 0 18px;
}
.about-grid p { margin: 0 0 16px; }

/* ---------- Resume (PDF) ---------- */
.resume-actions { text-align: center; margin: 0 0 24px; }
.btn {
  display: inline-block;
  font-family: "Jost", "Futura PT", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  text-decoration: none;
  color: #fff;
  background: var(--ink);
  padding: 12px 26px;
  border-radius: 2px;
  transition: opacity .15s ease;
}
.btn:hover { opacity: 0.8; }
.pdf-frame {
  width: 100%;
  height: 85vh;
  border: 1px solid var(--line);
}

/* ---------- Project detail pages ---------- */
.project-detail { max-width: 900px; margin: 0 auto; }

.back-link {
  display: inline-block;
  font-family: "Jost", "Futura PT", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 28px;
}
.back-link:hover { color: var(--ink); }
.back-link::before { content: "\2190\00a0"; }

.project-detail h1 {
  font-family: "Jost", "Futura PT", sans-serif;
  font-weight: 700;
  text-align: center;
  font-size: 32px;
  margin: 0 0 22px;
}

.project-detail h2 {
  font-family: "Jost", "Futura PT", sans-serif;
  font-weight: 700;
  text-align: center;
  font-size: 22px;
  margin: 44px 0 18px;
}

.project-detail p { margin: 0 0 20px; }
.project-detail .lead { font-size: 18px; }
.project-detail ul { margin: 0 0 20px; padding-left: 22px; }
.project-detail li { margin: 6px 0; }

.project-figure { margin: 30px 0; }
.project-figure img,
.project-figure video {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.project-figure figcaption {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}

/* two figures side by side */
.figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 30px 0;
  align-items: start;
}
.figure-row .project-figure { margin: 0; }

.project-detail .updated {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 32px;
}

/* clickable gallery items link to detail pages */
a.gallery-item { cursor: pointer; }

/* responsive 16:9 video embeds */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin: 30px 0;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* project details / facts box */
.facts {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 28px;
  margin: 30px auto;
  max-width: 560px;
}
.facts h2 { margin: 0 0 12px; font-size: 18px; }
.facts ul { list-style: none; margin: 0; padding: 0; }
.facts li {
  padding: 4px 0;
  font-size: 15px;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
}
.facts li:last-child { border-bottom: 0; }

/* team credits */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  margin-top: 18px;
}
.team-grid h3 {
  font-family: "Jost", "Futura PT", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  margin: 0 0 10px;
}
.team-grid ul { list-style: none; margin: 0; padding: 0; }
.team-grid li { font-size: 14px; color: #555; padding: 3px 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 56px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .social { justify-content: center; margin-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  :root { --pad: 24px; }
  .brand .logo { font-size: 34px; }
  .main-nav { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section-title { font-size: 24px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-grid .portrait { max-width: 320px; margin: 0 auto; }
  .pdf-frame { height: 70vh; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .figure-row { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 460px) {
  .gallery { grid-template-columns: 1fr; }
}
