/* Dr Miriam Carone, design portfolio
   One shared stylesheet. Colours are tokens so the palette can be changed in one place. */

:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-soft: #eef2f8;
  --ink: #0f1b2b;
  --ink-2: #44546a;
  --ink-3: #7a889b;
  --line: #e1e7ef;
  --accent: #1a63a8;
  --navy: #0b3f75;
  --accent-soft: #e6effa;
  --header-fill: linear-gradient(100deg, #072a52 0%, #0b3f75 100%);
  --header-ink: #ffffff;
  --header-muted: rgb(255 255 255 / 0.72);
  --header-hover: rgb(255 255 255 / 0.12);
  --button-fill: linear-gradient(100deg, #072a52 0%, #0b3f75 100%);
  --button-fill-hover: linear-gradient(100deg, #0e427f 0%, #1a63a8 100%);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgb(15 27 43 / 0.04), 0 12px 32px -16px rgb(15 27 43 / 0.18);
  --shadow-hover: 0 1px 2px rgb(15 27 43 / 0.05), 0 24px 48px -20px rgb(15 27 43 / 0.28);

  --content: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Header (styled after the RALPH app header band) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-fill);
  color: var(--header-ink);
  box-shadow: 0 6px 24px -12px rgb(7 42 82 / 0.5);
}
.site-header .bar {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}
.brand {
  font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
  display: flex; align-items: center; gap: 12px;
}
.brand small {
  font-weight: 500; font-size: 13px; color: var(--header-muted);
  padding-left: 2px;
}

.search { position: relative; max-width: 460px; width: 100%; justify-self: center; }
.search input {
  width: 100%; height: 38px;
  border: 0; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  padding: 0 44px 0 38px; font: inherit; font-size: 14px;
  outline: none; transition: box-shadow 0.2s var(--ease);
}
.search input:focus { box-shadow: 0 0 0 3px rgb(255 255 255 / 0.35); }
.search .icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.search kbd {
  position: absolute; right: 10px; top: 50%; translate: 0 -50%;
  font: 500 11px var(--font); color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
  padding: 6px; list-style: none; margin: 0;
  max-height: 60vh; overflow-y: auto;
}
.search-results[hidden] { display: none; }
.search-results a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 14px;
}
.search-results a span { display: block; color: var(--ink-3); font-size: 12px; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--accent-soft); }
.search-results .empty { padding: 10px 12px; color: var(--ink-3); font-size: 14px; }

.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 14px; font-weight: 600;
  color: var(--header-ink); transition: background 0.2s var(--ease);
}
.nav a:hover { background: var(--header-hover); }
.nav a[aria-current="page"] { background: #fff; color: #072a52; }
.nav svg { opacity: 0.9; }

@media (max-width: 760px) {
  .site-header .bar { grid-template-columns: 1fr auto; gap: 10px 12px; padding-block: 10px; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .search kbd { display: none; }
  .brand small { display: none; }
  .nav a { padding: 8px; }
  .nav a .label { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100vh - 64px); min-height: calc(100svh - 64px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 0 96px;
}
.hero .scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
}
.hero .scroll-cue:hover { color: #1559a3; }
.hero .scroll-cue svg { animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .hero .scroll-cue svg { animation: none; } }
.hero h1 {
  font-size: clamp(36px, 6vw, 68px); line-height: 1.08; letter-spacing: -0.025em;
  font-weight: 360; margin: 0; max-width: none;
}
.hero h1 { color: #1559a3; }
.hero { text-align: center; }
.hero h1 { margin-inline: auto; }
.hero p { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); margin: 20px 0 0; }
.hero p strong { color: var(--ink); font-weight: 600; }
.hero .location { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-2); margin-top: 14px; }
.hero .location svg { color: #1559a3; flex: none; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}

/* ---------- Work cards ---------- */
.section { padding: clamp(40px, 7vw, 80px) 0; }
.section-title { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; margin: 0 0 28px; }

.cards { display: grid; gap: 28px; }
.card {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 0;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.card .media { background: var(--surface-soft); padding: 24px; display: grid; place-items: center; overflow: hidden; }
.card .media img {
  border-radius: var(--radius); box-shadow: 0 10px 30px -14px rgb(15 27 43 / 0.35);
  transition: transform 0.6s var(--ease);
}
.card:hover .media img { transform: scale(1.025); }
.card .body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; }
.card h3 { font-size: 26px; letter-spacing: -0.02em; margin: 0; }
.card .tagline { color: var(--ink-2); margin: 8px 0 20px; }
.card .overview { color: var(--ink-2); font-size: 15px; margin: 0 0 24px; }
.meta { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 24px; margin: 0 0 24px; justify-content: start; }
.meta dt { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.meta dd { margin: 0; font-size: 14px; font-weight: 500; grid-row: 2; }
.cta {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--button-fill); color: #fff; font-size: 14px; font-weight: 600;
  transition: gap 0.3s var(--ease), background 0.3s var(--ease);
}
.card:hover .cta { gap: 12px; background: var(--button-fill-hover); }
.card:not(:has(.media)) { grid-template-columns: 1fr; }
.card:not(:has(.media)) .body { max-width: 760px; }

@media (max-width: 860px) {
  .card { grid-template-columns: 1fr; }
}

/* Placeholder slot for a screenshot that hasn't been supplied yet */
.slot {
  width: 100%; aspect-ratio: 16 / 10;
  border: 2px dashed #c6d1df; border-radius: var(--radius);
  display: grid; place-items: center; text-align: center;
  color: var(--ink-3); font-size: 14px; padding: 16px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgb(26 99 168 / 0.03) 12px 24px);
}
.draft-note {
  display: inline-block; font-size: 12px; font-weight: 600;
  background: #fff4d6; color: #7a5600; border-radius: 999px; padding: 3px 10px;
}

/* ---------- About / contact ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about p { color: var(--ink-2); margin: 0 0 16px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.timeline li:first-child { padding-top: 0; }
.timeline strong { font-weight: 600; }
.timeline span { color: var(--ink-3); font-size: 14px; }
.timeline .when { text-align: right; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

.contact {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: clamp(32px, 6vw, 64px); text-align: center;
}
.contact h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.03em; margin: 0 0 12px; }
.contact p { color: var(--ink-2); margin: 0 0 28px; }
.pill-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill-links a {
  padding: 10px 18px; border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 600;
  background: var(--surface-soft); transition: background 0.25s var(--ease);
}
.pill-links a:hover { background: var(--accent-soft); }
.pill-links a.primary { background: var(--button-fill); color: #fff; }
.pill-links a.primary:hover { background: var(--button-fill-hover); }

.site-footer { padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; text-align: center; }

/* ---------- Case study page ---------- */
.cs-hero { padding: clamp(48px, 9vw, 100px) 0 32px; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-3); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 28px; }
.back:hover { color: var(--ink); }
.cs-hero h1 { font-size: clamp(40px, 7vw, 76px); letter-spacing: -0.04em; line-height: 1; margin: 0; }
.cs-hero .tagline { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); margin: 16px 0 32px; max-width: 46ch; }
.cs-hero .meta { grid-template-columns: repeat(4, auto); gap: 4px 40px; }
.cs-cover { margin: 24px 0 0; }
.cs-cover img, .cs-cover video, figure img, figure video { border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); width: 100%; }

.cs-layout { display: grid; grid-template-columns: 180px 1fr; gap: 56px; padding: 56px 0 24px; }
.toc { position: sticky; top: 100px; align-self: start; list-style: none; margin: 0; padding: 0; }
.toc a {
  display: block; padding: 8px 14px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink-3); font-weight: 600; font-size: 15px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.toc a:hover { color: var(--ink); }
.toc a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .cs-layout { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
}

.cs-section { padding-bottom: 72px; }
.cs-section h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; margin: 0 0 20px; }
.cs-section h3 { font-size: 20px; letter-spacing: -0.01em; margin: 40px 0 10px; }
.cs-section p, .cs-section li { color: var(--ink-2); max-width: 68ch; }
.cs-section li { margin-bottom: 6px; }
.cs-section figure { margin: 32px 0; }
.cs-section figcaption { font-size: 14px; color: var(--ink-3); margin-top: 12px; text-align: center; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .two-up { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 28px 0; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 34px; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }
.stat span { font-size: 14px; color: var(--ink-3); }

blockquote {
  margin: 32px 0; padding: 28px 32px; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); font-size: 22px; letter-spacing: -0.01em; line-height: 1.4;
}
blockquote cite { display: block; font-style: normal; font-size: 14px; color: var(--ink-3); margin-top: 12px; }

.cs-pager { display: flex; gap: 16px; margin: 24px 0 0; }
.pager-link {
  flex: 1 1 0; display: flex; align-items: center; gap: 16px;
  background: var(--button-fill); color: #fff; border-radius: var(--radius-lg);
  padding: 24px 28px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.3s var(--ease);
}
.pager-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); background: var(--button-fill-hover); }
.pager-link.next { justify-content: flex-end; margin-left: auto; }
.pager-link.next div { text-align: right; }
.pager-link.next:only-child { max-width: 50%; }
.pager-link.prev:only-child { max-width: 50%; }
.pager-link div span { display: block; font-size: 14px; color: rgb(255 255 255 / 0.75); }
.pager-link strong { font-size: 20px; letter-spacing: -0.02em; }
@media (max-width: 640px) { .cs-pager { flex-direction: column; } .pager-link.next:only-child, .pager-link.prev:only-child { max-width: none; } }

/* ---------- Motion: gentle fade-up on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* Phone screenshots side by side, kept narrower than desktop shots */
.two-up.phones { max-width: 620px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .two-up.phones { grid-template-columns: 1fr 1fr; gap: 12px; } }
.flag { background: #fff4d6; color: #7a5600; border-radius: 6px; padding: 1px 6px; font-size: 0.9em; }

/* ---------- Work categories ---------- */
.category-title { font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); margin: 64px 0 18px; }
.section-title + .category-title { margin-top: 8px; }
/* Simple data tables inside case studies */
.cs-section .table-wrap { overflow-x: auto; margin: 24px 0; max-width: 68ch; }
.cs-section table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.cs-section th, .cs-section td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.cs-section th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; }
.cs-section td + td, .cs-section th + th { text-align: right; white-space: nowrap; }
.two-up.phones.three { grid-template-columns: repeat(3, 1fr); max-width: 720px; }
@media (max-width: 760px) { .two-up.phones.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .hero { min-height: calc(100vh - 100px); min-height: calc(100svh - 100px); } }
