/* michaelwittmeyer.com — quiet, austere, utility-first */

:root {
  --bg: #FAF9F6;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --line: #E5E2DA;
  --accent: #2C5282;
  --accent-hover: #1A365D;
  --serif: 'Source Serif Pro', Charter, 'Iowan Old Style', 'Apple Garamond', Cambria, Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
  padding-bottom: 1.25rem;
}
.site-header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav {
  font-family: var(--sans);
  font-size: 0.875rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Typography */
h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
}
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.25rem; margin-top: 2.5rem; }
h3 { font-size: 1rem; margin-top: 1.75rem; }

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
a:hover { color: var(--accent-hover); }

ul {
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
}
li { margin-bottom: 0.5rem; }

strong { font-weight: 600; }
em { font-style: italic; color: var(--muted); }

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}

/* Lead paragraph on home — inherits body font-size (18px) for visual consistency */
.lead {
  font-size: inherit;
}

/* Page intro */
.page-intro {
  margin-bottom: 2.5rem;
}

/* CTA buttons */
.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2rem 0 2.5rem;
}
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.625rem 1.125rem;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
.btn:hover {
  background: var(--bg);
  color: var(--text);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
}

/* Logo strip */
.logo-strip {
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.logo-strip-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.logo-strip-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: center;
}
.logo-strip-items span {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

/* About — headshot */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}
@media (min-width: 540px) {
  .about-grid {
    grid-template-columns: 1fr 140px;
  }
}
.about-grid img {
  width: 140px;
  height: 140px;
  max-width: 140px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.15);
  justify-self: end;
}

/* Home hero — name + small headshot */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.hero-headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.1);
  justify-self: end;
}
@media (min-width: 540px) {
  .hero-headshot {
    width: 96px;
    height: 96px;
  }
}

/* Logo strip links */
.logo-strip-items a {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.logo-strip-items a:hover {
  color: var(--text);
}

/* Portfolio + company-block links */
.portfolio a,
.company-block h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s, color 0.15s;
}
.portfolio a:hover,
.company-block h3 a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Timeline company links — same inherit-color style */
.timeline a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s, color 0.15s;
}
.timeline a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Career timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
}
.timeline li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.timeline li:last-child { border-bottom: none; }
.timeline-meta {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.25rem;
}

/* Honors / lists with sans labels */
.honors {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}
.honors li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}
.honors li:last-child { border-bottom: none; }

/* Forms */
form {
  margin-top: 1.5rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.form-field {
  margin-bottom: 1.25rem;
}
.form-field label {
  display: block;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
}
.form-field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--serif);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.75rem;
  margin-left: 0.5rem;
}
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.cf-turnstile {
  margin: 0.5rem 0 1.25rem;
}
button[type="submit"] {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
button[type="submit"]:hover {
  background: var(--bg);
  color: var(--text);
}
.form-success {
  padding: 1.5rem;
  background: #F0F4F8;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 0.9375rem;
  color: var(--text);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 2rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.5rem;
}
.site-footer a:hover { color: var(--text); }

/* Portfolio list on /investing */
.portfolio {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}
.portfolio li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}
.portfolio li:last-child { border-bottom: none; }

/* Companies list */
.company-block {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: center;
}
.company-block:last-of-type { border-bottom: none; }
.company-block h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}
.company-block .role {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.company-block .logo-tile {
  width: 140px;
  height: 84px;
  border-radius: 10px;
  background: #0F1B2A;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.company-block .logo-tile img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.company-block .logo-tile.invert img {
  filter: brightness(0) invert(1);
}
.company-block .content {
  min-width: 0;
}
.company-block .content > *:last-child { margin-bottom: 0; }

@media (max-width: 540px) {
  .company-block {
    grid-template-columns: 96px 1fr;
    gap: 1rem;
  }
  .company-block .logo-tile {
    width: 96px;
    height: 58px;
    padding: 10px 12px;
    border-radius: 8px;
  }
}

/* Skip link for a11y */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1rem;
  text-decoration: none;
}
.skip-link:focus { left: 0; z-index: 999; }
