/* Zachary Adam — serious, spare */

:root {
  --ink: #12161c;
  --muted: #5a6570;
  --line: #e6e8eb;
  --bg: #ffffff;
  --soft: #f7f8f9;
  --mast: #001f3f;
  --mast-text: #eef2f6;
  --accent: #2b6cb0;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Mast */
.mast {
  background: var(--mast);
  color: var(--mast-text);
  padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
}

.mast__inner {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 720px) {
  .mast__inner {
    grid-template-columns: 112px 1fr;
    gap: 1.75rem;
  }
}

.photo {
  width: 112px;
  height: 112px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: rgba(238, 242, 246, 0.6);
  margin-bottom: 0.45rem;
}

.name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.role {
  margin-top: 0.7rem;
  font-size: 15.5px;
  line-height: 1.5;
  color: rgba(238, 242, 246, 0.78);
  max-width: 44ch;
}

.contact {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
}

.contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13.5px;
  color: rgba(238, 242, 246, 0.9);
  text-decoration: none;
}

.contact a:hover { color: #fff; }

.contact svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Page */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem) 4.5rem;
}

.block {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.block:first-child {
  border-top: 0;
  padding-top: 0;
}

.block h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.35rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding: 1.35rem 1.4rem;
  background: var(--soft);
  border-radius: 8px;
}

@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--mast);
}

.stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 12.5px;
  color: var(--muted);
}

/* Services */
.services {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .services { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

.service {
  padding: 1.15rem 1.2rem;
  background: var(--soft);
  border-radius: 8px;
}

.service h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.service h3 svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.service ul { list-style: none; }
.service li {
  font-size: 14.5px;
  color: var(--muted);
  padding: 0.22rem 0;
  line-height: 1.45;
}

/* Stack — icon rows */
.stack {
  display: grid;
  gap: 0.35rem 2.5rem;
}

@media (min-width: 640px) {
  .stack { grid-template-columns: 1fr 1fr; }
}

.stack__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.stack__item:hover { text-decoration: none; }
.stack__item:hover strong { color: var(--accent); }

.stack__item img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}

.stack__item span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.stack__item strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.stack__item em {
  font-style: normal;
  font-size: 13.5px;
  color: var(--muted);
}

/* Education */
.edu {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  align-items: flex-start;
}

.edu__place {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.edu__place svg { color: var(--muted); }

.edu h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.edu__school {
  margin-top: 0.3rem;
  font-size: 14.5px;
  color: var(--muted);
}

.edu__year {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

/* Projects */
.projects {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 700px) {
  .projects { grid-template-columns: 1fr 1fr; }
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.card[hidden] {
  display: none;
}

.card__shot {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--mast);
}

.card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.card__body {
  padding: 1.1rem 1.15rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.card__body .badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.3rem;
  width: fit-content;
  margin-bottom: 0.55rem;
  padding: 0.22rem 0.6rem;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #21759b;
  background: rgba(33, 117, 155, 0.1);
  border-radius: 999px;
}

.card__title img,
.card__title svg,
.mark-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.card h3 {
  font-size: 15.5px;
  font-weight: 600;
}

.card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.card p.card__stat {
  flex: none;
  margin-top: 0.5rem;
  font-size: 12.5px;
}

.card__meta--links {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
}

.link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}

.load-more-btn {
  display: block;
  width: fit-content;
  margin: 1.35rem auto 0;
  padding: 0.6rem 1.4rem;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.load-more-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
}

.load-more-btn[hidden] {
  display: none;
}

/* Papers — title, one line, links */
.paper {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.paper:first-of-type { padding-top: 0; }
.paper:last-of-type { border-bottom: 0; padding-bottom: 0; }

.paper h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  max-width: 48ch;
}

.paper .plain {
  margin-top: 0.45rem;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.5;
}

.paper .meta {
  margin-top: 0.55rem;
  font-size: 12.5px;
  color: var(--muted);
}

.paper .links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

/* Certs */
.certs { list-style: none; }
.certs li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.certs li:last-child { border-bottom: 0; }
.certs strong {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
}
.certs span {
  display: block;
  margin-top: 0.25rem;
  font-size: 13.5px;
  color: var(--muted);
}
.certs .link { flex-shrink: 0; margin-top: 0.15rem; }

/* Project pages */
.page-top {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.back {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.back:hover { color: var(--accent); }

.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.35rem clamp(1.25rem, 4vw, 2.5rem) 1.35rem;
  border-bottom: 1px solid var(--line);
}

.hero .mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.hero .mark img { width: 28px; height: 28px; }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.15;
}

.hero .lead {
  margin-top: 0.6rem;
  color: var(--muted);
  max-width: 44ch;
}

.hero .links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.gallery {
  max-width: 880px;
  margin: 1.35rem auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  gap: 1rem;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.gallery img { display: block; width: 100%; height: auto; }

.gallery figcaption {
  font-size: 12.5px;
  color: var(--muted);
  padding: 0.55rem 0.8rem;
  background: var(--soft);
}

.prose {
  max-width: 52ch;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

footer {
  max-width: 880px;
  margin: 2rem auto 0;
  padding: 1.35rem clamp(1.25rem, 4vw, 2.5rem) 2.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 13px;
  color: var(--muted);
}

@media print {
  .mast { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .name, .role, .contact a { color: #000 !important; }
}
