/* Ed Scalley — portfolio. Brand matches the resume: coral Playfair headings, Lato body. */
:root {
  --bg: #fbf8f5;
  --surface: #ffffff;
  --ink: #1d2433;
  --ink-2: #4a5263;
  --muted: #6b7280;
  --line: #e8e1da;
  --accent: #c2412d;        /* coral, 5.1:1 on white — safe for text */
  --accent-soft: #fbe9e4;
  --teal: #0f6b62;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,36,51,.06), 0 8px 24px rgba(29,36,51,.06);
  --max: 1120px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Lato", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #9c2f1f; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 16px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.eyebrow { font: 700 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: block; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 680px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251,248,245,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { font: 700 1.25rem var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.nav a:hover { color: var(--accent); }
.nav .btn { padding: 9px 16px; font-size: .9rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--accent); background: var(--accent); color: #fff; transition: transform .15s, background .15s; }
.btn:hover { background: #a3331f; border-color: #a3331f; color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); color: #9c2f1f; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero { padding: 88px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.4fr .8fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: .25em; }
.hero .title-line { font: 700 1.05rem var(--sans); color: var(--teal); margin-bottom: 22px; letter-spacing: .01em; }
.hero-photo { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; max-width: 340px; justify-self: end; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; }
.proof strong { color: var(--ink); font-size: 1.15rem; display: block; font-family: var(--serif); }

/* Sections */
section { padding: 72px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head p { color: var(--ink-2); max-width: 520px; margin: 0; }
.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Featured cards */
.featured { display: grid; gap: 28px; }
.case-card { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.case-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(29,36,51,.06), 0 16px 40px rgba(29,36,51,.10); color: inherit; }
.case-card .media { background: #1d2433; min-height: 280px; position: relative; }
.case-card .media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.case-card .body { padding: 34px 36px; display: flex; flex-direction: column; }
.case-card h3 { font-size: 1.6rem; margin-bottom: 10px; }
.case-card p { color: var(--ink-2); }
.case-card .more { margin-top: auto; font-weight: 700; color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; padding: 0; list-style: none; }
.tags li { font-size: .78rem; font-weight: 700; letter-spacing: .02em; padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); color: #8f2c1c; }
.tags li.t { background: #e3f1ef; color: #0b5049; }

/* Generated media panel (no screenshot) */
.panel-art { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; color: #fff; }
.panel-art.onboard { background: linear-gradient(135deg, #0f6b62, #12443f); }
.panel-art.eval { background: linear-gradient(135deg, #2b3550, #1d2433); }
.mini-phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 420px; }
.mini-phases div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 14px 12px; font-size: .82rem; line-height: 1.35; }
.mini-phases b { display: block; font: 700 1.5rem var(--serif); margin-bottom: 4px; }
.mini-bars { width: 100%; max-width: 400px; }
.mini-bars .row { display: grid; grid-template-columns: 110px 1fr 34px; gap: 10px; align-items: center; font-size: .82rem; margin: 9px 0; }
.mini-bars .bar { height: 10px; border-radius: 0 4px 4px 0; background: #f0a493; }
.mini-bars .bar.low { background: #ffd27a; }

/* More work */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.mini-card .thumb { aspect-ratio: 16/9; background: #1d2433; overflow: hidden; }
.mini-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.mini-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.mini-card p { color: var(--ink-2); font-size: .95rem; }
.mini-card .links { margin-top: auto; display: flex; gap: 16px; font-weight: 700; font-size: .95rem; }

/* Capabilities */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cap { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.cap .num { font: 700 .8rem var(--sans); color: var(--accent); letter-spacing: .12em; }
.cap h3 { font-size: 1.2rem; margin: 6px 0 8px; }
.cap p { color: var(--ink-2); font-size: .95rem; margin-bottom: .6em; }
.cap .tools { font-size: .85rem; color: var(--muted); margin: 0; }
.toolbelt { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.toolbelt span { background: var(--surface); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: .88rem; font-weight: 700; color: var(--ink-2); }

/* About + contact */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about ul { padding-left: 1.1em; color: var(--ink-2); }
.contact-box { background: var(--ink); color: #fff; border-radius: 22px; padding: 56px; text-align: center; }
.contact-box h2 { color: #fff; }
.contact-box p { color: #d6dae3; max-width: 560px; margin: 0 auto 8px; }
.contact-box .btn-row { justify-content: center; }
.contact-box .btn.ghost { color: #fff; border-color: #fff; }
.contact-box .btn.ghost:hover { background: rgba(255,255,255,.1); }
.site-footer { padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Case study pages */
.cs-hero { padding: 64px 0 40px; }
.back { display: inline-block; margin-bottom: 26px; font-weight: 700; text-decoration: none; }
.snapshot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 34px 0 0; overflow: hidden; }
.snapshot div { padding: 18px 22px; border-right: 1px solid var(--line); }
.snapshot div:last-child { border-right: 0; }
.snapshot dt { font: 700 .72rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.snapshot dd { margin: 0; font-size: .95rem; font-weight: 700; color: var(--ink); line-height: 1.45; }
.launch { margin: 40px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.launch .shot { background: #1d2433; }
.launch .bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; flex-wrap: wrap; }
.launch .bar p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.cs-body { padding: 24px 0 72px; }
.cs-grid { display: grid; grid-template-columns: 220px 1fr; gap: 56px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: .92rem; }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--accent); border-color: var(--accent); }
.cs-content { max-width: 760px; min-width: 0; }
.cs-content section { padding: 0 0 48px; }
.cs-content h2 { font-size: 1.8rem; }
.cs-content ul { padding-left: 1.2em; }
.cs-content li { margin-bottom: .45em; }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 24px 0; }
.callout p:last-child { margin: 0; }
.steps { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 16px 62px; position: relative; margin: 0 !important; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 15px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.steps b { display: block; color: var(--ink); }
figure { margin: 26px 0; }
figure img { border-radius: 12px; border: 1px solid var(--line); background: #fff; }
figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.fig2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat b { display: block; font: 700 2rem/1.1 var(--serif); color: var(--accent); }
.stat span { font-size: .85rem; color: var(--ink-2); }
.next-proj { border-top: 1px solid var(--line); padding: 40px 0 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Curriculum map */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0; }
.phase { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.phase header { background: var(--teal); color: #fff; padding: 14px 18px; }
.phase header b { display: block; font: 700 1.15rem var(--serif); }
.phase header span { font-size: .82rem; opacity: .9; }
.phase ul { list-style: none; padding: 12px 18px 16px !important; margin: 0; font-size: .9rem; }
.phase li { padding: 7px 0; border-bottom: 1px dashed var(--line); margin: 0 !important; }
.phase li:last-child { border: 0; }
.phase li small { display: block; color: var(--muted); font-size: .78rem; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px; font-size: .82rem; }
.legend-row span { padding: 4px 10px; border-radius: 999px; background: #eef0f4; color: var(--ink-2); font-weight: 700; }

/* Score chart (single series, direct-labeled) */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin: 26px 0; }
.chart h3 { font-family: var(--sans); font-size: 1rem; margin-bottom: 4px; }
.chart .sub { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.chart .row { display: grid; grid-template-columns: 170px 1fr 44px; gap: 12px; align-items: center; padding: 7px 0; font-size: .92rem; border-radius: 6px; }
.chart .row:hover { background: #f6f2ee; }
.chart .track { height: 14px; background: #f1ece7; border-radius: 0 4px 4px 0; position: relative; }
.chart .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--teal); border-radius: 0 4px 4px 0; }
.chart .row.low .fill { background: var(--accent); }
.chart .val { font-weight: 700; text-align: right; color: var(--ink); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 20px 0; background: var(--surface); }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
video { width: 100%; border-radius: 12px; background: #000; }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap, .about, .cs-grid { grid-template-columns: 1fr; }
  .hero .wrap { gap: 28px; }
  .hero-photo { justify-self: start; width: 140px; max-width: 140px; aspect-ratio: 1 / 1; border-radius: 50%; order: -1; }
  .hero-photo img { object-position: 50% 20%; }
  .case-card { grid-template-columns: 1fr; }
  .case-card .media { min-height: 220px; }
  .grid3, .caps, .phases { grid-template-columns: 1fr; }
  .snapshot { grid-template-columns: 1fr 1fr; }
  .snapshot div:nth-child(2) { border-right: 0; }
  .snapshot div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats { grid-template-columns: 1fr 1fr; }
  .toc { display: none; }
  .fig2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav a:not(.btn) { display: none; }
  .hero { padding: 48px 0; }
  section { padding: 56px 0; }
  .case-card .body { padding: 24px; }
  .contact-box { padding: 36px 22px; }
  .chart .row { grid-template-columns: 110px 1fr 38px; font-size: .85rem; }
  .mini-bars .row { grid-template-columns: 92px 1fr 30px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
