/* ==========================================================================
   style.css
   One stylesheet shared by every page.
   Colors and fonts live in the :root block below, so you can change the
   whole look by editing a few lines.
   ========================================================================== */

/* --- 1. Design tokens (edit these to change colors and fonts) ------------ */
:root {
  --color-text: #1f2328;
  --color-muted: #5b6370;
  --color-bg: #ffffff;
  --color-surface: #f5f6f8;
  --color-tint: #e6f6f6;
  --color-paper: #ffffff;
  --color-accent: #1d6b78;
  --color-accent-dark: #15515c;
  --color-coral: #b14a33;
  --color-border: #dfe2e7;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: inherit;

  --max-width: 1040px;
  --gutter: 16px;
}

/* --- 2. Base styles ------------------------------------------------------ */
* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-accent);
}

a:hover,
a:focus {
  color: var(--color-accent-dark);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: 2.2rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

ul {
  padding-left: 0;
}

/* --- 3. Layout helpers --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 56px 0;
}

/* Section headings get a short accent bar underneath */
.section-title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 28px;
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 10px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* --- 4. Header and navigation -------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.site-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* --- 5. Hero ------------------------------------------------------------- */
.hero {
  padding-top: 56px;
  padding-bottom: 56px;
  background: linear-gradient(180deg, var(--color-tint) 0%, var(--color-bg) 100%);
}

/* Headshot column on the left, intro on the right (stacked on phones) */
.hero-top {
  display: grid;
  gap: 24px;
  align-items: start;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}

.hero-intro {
  min-width: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-coral);
  margin-bottom: 8px;
}

.lead {
  font-size: 1.15rem;
  color: var(--color-text);
  max-width: 640px;
}

.sub {
  max-width: 640px;
  color: var(--color-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.headshot {
  margin: 0;
  width: 100%;
  max-width: 160px;
}

.headshot img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--color-border);
}

/* "At a glance" side panel */
/* At-a-glance: a compact strip of four facts, 2 across on phones and 4 across on wide screens */
.at-a-glance {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
}

.glance-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.at-a-glance ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 0;
}

.at-a-glance li {
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0;
}

.at-a-glance strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

/* --- 6. Stats strip ------------------------------------------------------ */
.stats {
  padding-top: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--color-border);
}

.stat-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}

.stat .metric {
  margin-bottom: 6px;
}

.stat-label {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* --- 7. Shared number style ---------------------------------------------- */
.metric {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* --- 8. Cards ------------------------------------------------------------ */
.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.card p:last-child {
  margin-bottom: 0;
}

.highlights {
  background: var(--color-surface);
}

.principles {
  background: var(--color-bg);
}

/* --- 9. Buttons ---------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
  background: var(--color-accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.button:hover,
.button:focus {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #ffffff;
}

.button-secondary {
  background: transparent;
  color: var(--color-accent);
}

.button-secondary:hover,
.button-secondary:focus {
  background: var(--color-accent);
  color: #ffffff;
}

/* --- 10. Call to action and footer --------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* --- 10a. Work page: sheets of paper ------------------------------------- */
.page-intro {
  padding-top: 56px;
  padding-bottom: 32px;
  background: linear-gradient(180deg, var(--color-tint) 0%, var(--color-surface) 100%);
}

.page-intro h1 {
  font-size: 2rem;
}

.papers {
  background: var(--color-surface);
  padding-top: 40px;
  padding-bottom: 64px;
}

.paper-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

/* Each case study is a white sheet with a soft shadow */
.paper {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.06);
}

.paper h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.paper-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-coral);
  margin-bottom: 8px;
}

.paper dl {
  margin: 0;
}

/* Each part of the case study: a small label, a hairline above it, then the text */
.paper dt {
  display: block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-muted);
}

.paper dt:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.paper dd {
  margin: 6px 0 0 0;
  line-height: 1.6;
}

/* Lists inside a case study section */
.paper dd ul {
  margin: 0;
  padding-left: 20px;
}

.paper dd li {
  margin-bottom: 10px;
}

.paper dd li:last-child {
  margin-bottom: 0;
}

/* Result stands out in a tinted box */
.paper dd.result {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--color-tint);
  border-left: 3px solid var(--color-coral);
  border-radius: 2px;
}

/* Placeholder until you add a real image */
.image-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  border: 2px dashed var(--color-border);
  border-radius: 2px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 0.9rem;
}

.image-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Images are hidden for now, so the Work pages lead with text.
   To show image boxes again, delete this rule. */
.image-slot {
  display: none;
}

/* News-style teaser list on the Work page */
.article-list {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

.article {
  display: flex;
  flex-direction: column;
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.06);
}

.article .image-slot {
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

.article-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 26px;
}

.article h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.article h2 a {
  color: var(--color-text);
  text-decoration: none;
}

.article h2 a:hover,
.article h2 a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

.article .intro {
  color: var(--color-muted);
  margin-bottom: 16px;
}

.read-more {
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
}

/* Full case study page */
.case-page {
  background: var(--color-surface);
  padding-top: 32px;
  padding-bottom: 64px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 600;
  text-decoration: none;
}

.case-detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 28px;
}

.case-detail h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

@media (min-width: 900px) {
  .article-list {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* --- 10a2. About page --------------------------------------------------- */
.about-intro {
  padding-top: 56px;
  padding-bottom: 56px;
  background: linear-gradient(180deg, var(--color-tint) 0%, var(--color-bg) 100%);
}

.about-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: start;
}

.about-grid p {
  max-width: 640px;
}

.about-grid .button {
  margin-top: 8px;
}

.beyond {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 6px;
  padding: 22px 24px;
}

.beyond p:not(.glance-title) {
  color: var(--color-muted);
}

.timeline-section {
  background: var(--color-surface);
  padding-top: 48px;
  padding-bottom: 64px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--color-border);
}

.timeline li {
  position: relative;
  padding: 0 0 28px 24px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.tl-dates {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-coral);
  margin-bottom: 4px;
}

.timeline h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.timeline p:not(.tl-dates) {
  color: var(--color-muted);
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

/* --- 10a3. Header location, open-to line, card links, contact line --------- */
.site-location {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.open-to {
  font-weight: 600;
  color: var(--color-accent);
  max-width: 640px;
}

.card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.card h3 a:hover,
.card h3 a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

.confidential-note {
  margin-top: 16px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-muted);
  max-width: 640px;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fun-fact,
.contact-line {
  color: var(--color-muted);
  max-width: 640px;
}

/* --- 10b. Social icon links (LinkedIn) ------------------------------------ */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
  color: var(--color-accent);
  text-decoration: none;
}

.social-link:hover,
.social-link:focus {
  background: var(--color-accent);
  color: #ffffff;
}

.social-link svg {
  display: block;
}

/* --- 11. Wider screens --------------------------------------------------- */
@media (min-width: 640px) {
  h1 {
    font-size: 3rem;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 640px) {
  .hero-top {
    grid-template-columns: 180px 1fr;
    gap: 32px;
  }

  .at-a-glance ul {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .at-a-glance li {
    padding: 0 16px;
    border-left: 1px solid var(--color-border);
  }

  .at-a-glance li:first-child {
    padding-left: 0;
    border-left: none;
  }
}

/* Respect visitors who turn off motion */
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}

/* --- 12. Dark mode (follows the visitor's device setting) ----------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e6e8eb;
    --color-muted: #a3aab5;
    --color-bg: #15171a;
    --color-surface: #1d2025;
    --color-tint: #132a2b;
    --color-paper: #1f2329;
    --color-accent: #6ec6d3;
    --color-accent-dark: #a6e0ea;
    --color-coral: #ef8f78;
    --color-border: #2c3138;
  }

  .button,
  .button:hover,
  .button:focus,
  .button-secondary:hover,
  .button-secondary:focus,
  .social-link:hover,
  .social-link:focus {
    color: #15171a;
  }

  /* Outline buttons keep the accent-colored text in dark mode */
  .button-secondary {
    color: var(--color-accent);
  }

  .card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
}
