/* tectrap.com redesign (demo). One stylesheet, mobile first. */

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #204265;        /* the old biography band */
  --navy-deep: #182f49;
  --blue: #2a5fa8;        /* close to the Tectrap logo blue, 6:1 on white */
  --blue-dark: #1e4a86;
  --ink: #1d2733;
  --muted: #4f5d6b;       /* 6.6:1 on white */
  --line: #d9e0e8;
  --pale: #f3f6f9;
  --white: #fff;
  --on-navy-muted: #c9d6e4;
  --tbc-bg: #fff3c4;
  --tbc-ink: #5c4300;

  --font-head: "Lato", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Segoe UI", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: 1.25rem;
  --radius: 6px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--blue); text-underline-offset: .15em; }
a:hover { color: var(--blue-dark); }

/* Focus ring: navy on light sections (10:1 on white, 9:1 on pale grey),
   white on navy sections (10:1 on #204265, 13:1 on #182f49). */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-navy :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--white);
}

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

.skip-link {
  position: absolute;
  left: .5rem;
  top: -4rem;
  z-index: 10;
  background: var(--white);
  color: var(--navy);
  padding: .75rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { top: .5rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Placeholder the owner must fill in */
.tbc {
  background: var(--tbc-bg);
  color: var(--tbc-ink);
  padding: 0 .3em;
  border-radius: 3px;
  font-size: .9em;
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding-top: .6rem;
  padding-bottom: .6rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-head); font-size: 1.15rem; color: var(--navy); }
.brand-tag { font-size: .8rem; color: var(--muted); }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: .25rem;
}
.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .7rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: var(--radius);
}
.nav a:hover { background: var(--pale); color: var(--navy); }
.nav a[aria-current="page"] {
  color: var(--navy);
  box-shadow: inset 0 -3px 0 var(--blue);
  border-radius: 0;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.3;
}
.button-primary { background: var(--blue); color: var(--white); }
.button-primary:hover { background: var(--blue-dark); color: var(--white); }
.button-secondary { border-color: currentColor; color: var(--navy); background: transparent; }
.button-secondary:hover { background: var(--pale); color: var(--navy); }
.on-navy .button-secondary { color: var(--white); }
.on-navy .button-secondary:hover { background: rgba(255,255,255,.1); color: var(--white); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* ---------- Hero (home) ---------- */

.hero {
  background: var(--navy);
  color: var(--white);
}
.hero-grid { display: grid; }
.hero-text { padding: 2.5rem var(--gutter) 2.25rem; }
.eyebrow {
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
  margin-bottom: .75rem;
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .lead { font-size: 1.125rem; color: #e8eef5; max-width: 38rem; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 62%;
}

.facts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255,255,255,.2);
  display: grid;
  gap: .9rem;
}
.facts strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--white);
}
.facts span { color: var(--on-navy-muted); font-size: .95rem; }

/* ---------- Sections ---------- */

.section { padding: 3.5rem 0; }
.section-pale { background: var(--pale); }
.section-intro { max-width: 44rem; margin-bottom: 2rem; }
.section-intro p { color: var(--muted); }
.kicker {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .5rem;
}

.cards { display: grid; gap: 1.25rem; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card p:last-child { margin-bottom: 0; }

.for-whom {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--navy);
  background: var(--white);
  max-width: 50rem;
}
.for-whom p { margin: 0; }

/* Employer logos */
.logos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.logos li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem;
}
.logos img { max-height: 64px; width: auto; max-width: 100%; object-fit: contain; }

/* Kinds of projects */
.projects {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.projects li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: .15rem;
}
.projects .what { font-size: 1.05rem; }
.projects .where { color: var(--muted); font-size: .92rem; }

.more-link { margin-top: 1.5rem; }

/* Biography */
.bio { display: grid; gap: 1.75rem; align-items: start; }
.bio-photo img {
  width: 220px;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(16, 36, 58, .15);
}

/* Contact band */
.contact-band {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0;
}
.contact-band h2 { color: var(--white); }
.contact-band p { color: #e8eef5; max-width: 40rem; }

/* ---------- Inner pages ---------- */

.page-head {
  background: var(--pale);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
}
.page-head .lead { font-size: 1.125rem; color: var(--muted); max-width: 44rem; margin-bottom: 0; }
.page-head .button-row { margin-top: 1.25rem; }

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline > li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 3px solid var(--line);
}
.timeline > li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 1.85rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--blue);
}
.timeline > li:first-child::before { background: var(--blue); }
.t-years {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0;
}
.t-length { color: var(--muted); font-size: .9rem; }
.t-org { margin: .1rem 0 .4rem; font-size: 1.3rem; }
.t-roles { margin: 0; padding-left: 1.1rem; }
.t-roles li { margin-bottom: .25rem; }
.t-logo {
  width: 140px;
  height: 84px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .6rem;
}
.t-logo img { max-height: 60px; width: auto; object-fit: contain; }

/* Contact page */
.contact-grid { display: grid; gap: 1.5rem; }
.email-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.2rem;
  min-height: 48px;
  word-break: break-all;
}
.details { margin: 0; }
.details dt { color: var(--muted); font-size: .9rem; }
.details dd { margin: 0 0 .75rem; }

/* Credits page */
.prose { max-width: 44rem; }
.prose ul { padding-left: 1.2rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy-muted);
  font-size: .92rem;
  padding: 2rem 0;
}
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--white); }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
}

/* ---------- Larger screens ---------- */

@media (min-width: 40em) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .logos { grid-template-columns: repeat(4, 1fr); }
  .projects li { grid-template-columns: 1fr 16rem; gap: 1.5rem; align-items: baseline; }
  .timeline > li { grid-template-columns: 1fr 140px; padding-left: 2rem; }
  .t-logo { grid-column: 2; grid-row: 1; }
  .contact-grid { grid-template-columns: 3fr 2fr; gap: 3rem; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 56em) {
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
    max-width: var(--wrap);
    margin: 0 auto;
    min-height: 34rem;
  }
  .hero-text { padding: 4.5rem 3rem 3.5rem var(--gutter); align-self: center; }
  .hero-photo { position: relative; }
  .hero-photo img {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    object-position: 50% 60%;
  }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .logos { grid-template-columns: repeat(7, 1fr); }
  .bio { grid-template-columns: 240px 1fr; gap: 3rem; }
  .bio-photo img { width: 240px; }
  .section { padding: 4.5rem 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .nav a { transition: background-color .15s ease, color .15s ease; }
}

.h3-size { font-size: 1.25rem; }
.contact-grid > .card { align-self: start; }
