/* ThomasJohannesen.com — single stylesheet */
:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-alt: #F1F1EE;
  --text-primary: #14171A;
  --text-secondary: #5B6168;
  --border: #E3E3DF;
  --accent: #0E4F4A;
  --accent-hover: #0A3A36;
  --accent-soft: #E6EEEC;
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, .08);
  --radius: 12px;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-soft); color: var(--accent-hover); }

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

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

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2.5rem, 4vw + 1rem, 4rem); }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); margin-bottom: .5rem; }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.prose { max-width: 760px; }

section { padding: 120px 0; }
section.alt { background: var(--surface-alt); }

.section-head { margin-bottom: 48px; }
.section-head .eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}
.section-head p.lede { color: var(--text-secondary); max-width: 640px; margin-top: .5rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease;
}
.nav.scrolled {
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.nav-toggle { display: none; }

/* ---------- Identity band (compact hero) ---------- */
.idband {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 84px 0 20px;
}
.idband-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}
.idband .eyebrow { color: var(--accent); }
.idband .eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}
.idband h1 {
  font-size: clamp(1.7rem, 1.6vw + .9rem, 2.2rem);
  margin: 10px 0 6px;
}
.idband h1 .role {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .55em;
  color: var(--text-secondary);
}
.idband .posline { color: var(--text-secondary); font-size: 1.0625rem; max-width: 620px; }
.idband-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: .8125rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.idband-contact { display: flex; gap: 18px; font-size: .8125rem; font-weight: 500; }
.idband-contact a, .idband-contact span { color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.idband-contact a:hover { color: var(--accent); }
.idband-contact svg { width: 14px; height: 14px; color: var(--accent); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9375rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { border: 1.5px solid var(--border); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero gallery (above the fold) ---------- */
.hero-work { padding: 22px 0 52px; }
.hero-work .gallery-label { margin-bottom: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero-work .gallery-label .lede { font-size: .9375rem; color: var(--text-secondary); margin: 0; }
.hero-work-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.hero-work-grid .work-card.featured { grid-column: auto; grid-row: auto; }
.hero-work-side { display: grid; grid-template-rows: 1fr 1fr; gap: 24px; }

.work-card.mini .work-body { padding: 12px 18px 16px; gap: 5px; }
.work-card.mini .work-body h3 { font-size: 1.05rem; }
.work-card.mini .hook { font-size: .8125rem; }
.work-card.mini .open-link { font-size: .8125rem; margin-top: 2px; }
.work-card.mini .tag { font-size: .625rem; padding: 3px 9px; }
.work-card.mini .thumb-window { aspect-ratio: auto; flex: 1; min-height: 120px; }
.work-card.mini { min-height: 0; }
.work-card.mini .thumb-mat { flex: 1; display: flex; }
.work-card.mini .thumb-mat .thumb-window { width: 100%; }

/* ---------- Stat strip ---------- */
.stat-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0;
}
.stat-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat { display: flex; align-items: baseline; gap: 10px; justify-content: center; }
.stat .num {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
}
.stat .label { font-size: .8125rem; font-weight: 500; color: var(--text-secondary); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.about-grid p + p { margin-top: 1.1rem; }
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 28px;
}
.callout .rule-title {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.callout p { font-size: .9375rem; color: var(--text-secondary); }

/* ---------- Capabilities ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.cap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cap-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.cap-card .glyph {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.cap-card .glyph svg { width: 20px; height: 20px; }
.cap-card h3 { margin-bottom: 10px; }
.cap-card p { font-size: .9375rem; color: var(--text-secondary); }

/* ---------- Work gallery ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.work-card {
  grid-column: span 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  color: var(--text-primary);
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text-primary); }
.work-card.featured { grid-column: span 2; grid-row: span 1; }
.thumb-mat { padding: 8px 8px 0; background: var(--surface); }
.thumb-window {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.thumb-window img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  filter: saturate(.95) contrast(1.02);
  transition: transform .3s ease;
}
.work-card:hover .thumb-window img { transform: scale(1.03); }
.work-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tag {
  align-self: flex-start;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.work-body h3 { font-size: 1.35rem; }
.work-card.featured .work-body h3 { font-size: 1.6rem; }
.work-body .hook { font-size: .9375rem; color: var(--text-secondary); flex: 1; }
.work-card.cta-card { background: var(--accent); border-color: var(--accent); grid-column: span 2; }
.work-card.cta-card .work-body { justify-content: center; }
.work-card.cta-card .work-body { padding-top: 28px; }
.work-card.cta-card .tag { background: rgba(255, 255, 255, .16); color: #fff; }
.work-card.cta-card h3, .work-card.cta-card:hover { color: #fff; }
.work-card.cta-card .hook { color: rgba(255, 255, 255, .78); }
.work-card.cta-card .open-link { color: #fff; }
.open-link { font-size: .875rem; font-weight: 600; color: var(--accent); margin-top: 6px; }
.work-card:hover .open-link { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Resume timeline ---------- */
.timeline { position: relative; max-width: 860px; margin-top: 8px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border);
}
.tl-item { position: relative; padding: 0 0 34px 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}
section.alt .tl-item::before { border-color: var(--surface-alt); }
.tl-item .years {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9375rem;
  color: var(--accent);
}
.tl-item h3 { margin: 2px 0 4px; }
.tl-item p { font-size: .9375rem; color: var(--text-secondary); max-width: 700px; }

.creds {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.cred {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.cred .eyebrow { color: var(--accent); margin-bottom: 8px; }
.cred p { font-size: .9375rem; }
.cred p small { color: var(--text-secondary); }

/* ---------- Contact ---------- */
.contact-wrap { text-align: center; max-width: 640px; margin: 0 auto; }
.contact-wrap p.invite { color: var(--text-secondary); margin: 10px 0 36px; }
.contact-lines { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 500;
}
.contact-line svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  font-size: .8125rem;
  color: var(--text-secondary);
}
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: opacity .4s ease; transform: none; }
  .work-card, .cap-card, .thumb-window img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  section { padding: 72px 0; }
  .idband { padding: 92px 0 22px; }
  .idband-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .idband-right { align-items: flex-start; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-work-grid { grid-template-columns: 1fr; }
  .hero-work-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .work-card.mini .thumb-window { aspect-ratio: 16 / 10; flex: none; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card.featured { grid-column: span 2; }
  .stat-strip-inner { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .stat { justify-content: flex-start; }
}

@media (max-width: 640px) {
  section { padding: 56px 0; }
  body { font-size: 1rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1rem; font-family: var(--font-head); }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .875rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
  }
  .cta-row .btn { flex: 1; text-align: center; }
  .cta-row { align-self: stretch; }
  .hero-work-side { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; gap: 20px; }
  .work-card.featured, .work-card.cta-card { grid-column: span 1; }
  .trust-chip { white-space: normal; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .cta-row, .hero-card, footer .footer-links { display: none; }
  section, .hero { padding: 24px 0; }
  body { background: #fff; }
  .work-card { box-shadow: none; }
  .open-link::after { content: " (" attr(data-url) ")"; font-weight: 400; color: var(--text-secondary); }
}
