/* Alice Barton — shared styles for index.html and projects/*.html */

:root {
  --bg: #fafaf7;
  --ink: #111;
  --muted: #5a5a55;
  --rule: #e5e3dc;
  --accent: #2b4eff;
  --accent-soft: #eef1ff;
  --radius: 12px;
  --max: 720px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

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

/* Nav */
nav.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
nav.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
nav.top .name {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
}
nav.top ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
}
nav.top a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
}
nav.top a:hover { color: var(--ink); }

/* Hero (homepage) */
.hero { padding: 88px 0 56px; }
.hero h1 {
  font-size: clamp(40px, 7vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  font-weight: 600;
}
.hero .role {
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 8px;
  font-weight: 500;
}
.hero .lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  margin: 18px 0 28px;
  max-width: 600px;
}
.hero .lede strong { color: var(--ink); font-weight: 500; }

/* Case-study hero (project pages) */
.case-hero { padding: 48px 0 24px; }
.case-hero h1 {
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 600;
}
.case-hero .role {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 500;
}
.case-hero .lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin: 14px 0 0;
  max-width: 600px;
}

/* Eyebrow (shared) */
.eyebrow {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.case-hero .eyebrow { margin-bottom: 12px; }

/* CTA buttons (homepage hero) */
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Sections (homepage) */
section { padding: 56px 0; }
h2 {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
  font-weight: 600;
}
h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
  font-weight: 600;
}
.meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
li:last-child { margin-bottom: 0; }

/* About */
.about p { font-size: 18px; }

/* Case (homepage cards) */
.case { padding: 28px 0; border-top: 1px solid var(--rule); }
.case:first-of-type { border-top: 0; padding-top: 0; }
.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 16px;
}
.case-head h3 { font-size: 22px; margin: 0; }
.case-head .when { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.case dl { display: grid; grid-template-columns: 92px 1fr; gap: 18px 20px; margin: 0; }
.case dt {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
  align-self: start;
}
.case dd { margin: 0; }

.outcome {
  display: inline-block;
  background: var(--accent-soft);
  color: #1a2fb0;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 500;
  margin-right: 4px;
}

/* "Read case study →" button inside each case card.
   Uses the .btn class for shared pill styling; this just adds the
   filled-on-hover affordance to differentiate it from hero buttons. */
.case-cta { margin: 18px 0 0; }
.case-cta .btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* FAQ — native <details>/<summary> */
.faq details { border-top: 1px solid var(--rule); padding: 14px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq details > p { margin-top: 12px; color: var(--muted); font-size: 16px; }

/* Testimonials — case study pages use the simple stacked variant */
.quotes figure { margin: 0 0 28px; }
.quotes figure:last-child { margin-bottom: 0; }
.quotes blockquote {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.5;
  font-style: italic;
  border-left: 2px solid var(--rule);
  padding: 2px 0 2px 18px;
  color: var(--ink);
}
.quotes figcaption {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left: 20px;
}

/* Testimonials carousel — horizontal scroll-snap, no JS */
.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 16px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-track { background: transparent; }
.carousel::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
.carousel::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.quote-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: 1fr auto;
  gap: 14px 18px;
  align-items: start;
}
.quote-card .headshot {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  grid-row: span 2;
}
.quote-card blockquote {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  font-style: normal;
}
.quote-card blockquote .lead {
  font-weight: 500;
  margin-bottom: 10px;
}
.quote-card blockquote p { margin: 0 0 10px; }
.quote-card blockquote p:last-child { margin-bottom: 0; }
.quote-card figcaption {
  grid-column: 2;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 4px;
  border-top: 1px solid var(--rule);
  margin-top: 4px;
}
/* Carousel: click-only — manual swipe is disabled */
.carousel {
  /* Both axes hidden — overflow-x: hidden alone makes overflow-y auto per spec,
     which can surface a vertical scrollbar mid-height-transition. */
  overflow: hidden;
  scroll-snap-type: none;
  /* Reset the swipe-era padding/margin so card height = container height exactly.
     Without this, the carousel's own padding clips the card's bottom border. */
  padding: 0;
  margin: 0;
  align-items: start;
  transition: height 0.3s ease;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 18px 0 0;
}
.carousel-controls button {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.carousel-controls button:hover:not(:disabled) { border-color: var(--ink); color: var(--accent); }
.carousel-controls button:disabled { opacity: 0.35; cursor: not-allowed; }
.carousel-counter {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: center;
}

/* Earlier roles timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
  font-size: 16px;
}
.timeline .yr { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.timeline .what strong { font-weight: 600; }
.timeline .what span { color: var(--muted); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li {
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 0;
}
.group + .group { margin-top: 22px; }
.group h4 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* Education */
.edu { list-style: none; padding: 0; margin: 0; }
.edu li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
  font-size: 16px;
  margin-bottom: 0;
}
.edu li + li { margin-top: 8px; }
.edu .yr { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Contact */
.contact ul { list-style: none; padding: 0; margin: 0; }
.contact li { font-size: 18px; padding: 8px 0; margin-bottom: 0; }

footer {
  padding: 56px 0 80px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

/* ===== Case-study-only ===== */

.hero-image { padding: 24px 0 8px; }
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}

section.case-section { padding: 40px 0; border-top: 1px solid var(--rule); }
section.case-section:first-of-type { border-top: 0; }
.case-section h2 { margin-bottom: 16px; }

figure { margin: 20px 0; }
figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--rule);
}
figure figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}
/* Override caption styling for quotes (it's already styled above; this keeps it left-aligned) */
.quotes figcaption { text-align: left; margin-top: 0; }

/* Pros/cons two-column (DigitalOcean case study) */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 14px 0; }
.proscons h4 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
}

/* Next case study link */
.next-case { padding: 40px 0 24px; border-top: 1px solid var(--rule); }
.next-case .label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.next-case a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.next-case a:hover { color: var(--accent); }

/* ===== Mobile ===== */
@media (max-width: 560px) {
  .hero { padding: 56px 0 40px; }
  .case-hero { padding: 32px 0 16px; }
  section { padding: 44px 0; }
  section.case-section { padding: 32px 0; }
  .case-hero h1 { font-size: 32px; }
  .case dl { grid-template-columns: 1fr; gap: 4px; }
  .case dd + dt { margin-top: 14px; }
  .timeline li, .edu li { grid-template-columns: 1fr; gap: 2px; }
  .timeline .yr, .edu .yr { font-size: 13px; }
  .proscons { grid-template-columns: 1fr; gap: 12px; }
  nav.top ul { gap: 16px; }
  nav.top .name { display: none; }
}

/* ===== Print ===== */
@media print {
  :root { --bg: #fff; }
  nav.top, .ctas, footer, .next-case, .carousel-controls { display: none !important; }
  /* Stack the testimonial carousel for print */
  .carousel { display: block; overflow: visible; padding: 0; margin: 0; }
  .quote-card { display: block; margin-bottom: 14px; page-break-inside: avoid; }
  .quote-card .headshot { display: none; }
  .quote-card figcaption { border-top: 0; padding-top: 0; margin-top: 0; }
  body { font-size: 11pt; }
  .hero { padding: 0 0 20px; }
  .case-hero { padding: 0 0 16px; }
  .hero h1 { font-size: 28pt; }
  .case-hero h1 { font-size: 22pt; }
  .lede { font-size: 12pt; }
  section { padding: 16px 0; page-break-inside: avoid; }
  section.case-section { padding: 12px 0; page-break-inside: avoid; }
  .case { page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .wrap { max-width: 100%; padding: 0; }
  .outcome { background: transparent; padding: 0; color: #000; font-weight: 600; }
  figure img { border: 1px solid #ccc; }
}
