/* Fieldcraft portfolio kit — the base every theme builds on.

   One markup vocabulary (pk-*) for every example portfolio; a theme in
   themes/<name>.css re-dresses it — colours, type, layout — so any example can
   be shown in any theme (?t=<name>, see kit.js). This file on its own is a
   calm, light, neutral site. Every visual is CSS: project covers are drawn
   from two colours per project (--c1, --c2) and a data-kind pattern.

   Themes should restyle through the custom properties first and only
   override selectors when the layout itself changes. */

:root {
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --ink: #16181D;
  --ink-2: #3D424B;
  --muted: #6B7280;
  --line: #E4E2DC;
  --accent: #1F6F63;
  --accent-ink: #FFFFFF;
  --accent-2: #B7791F;
  --display: 'Fraunces', Georgia, serif;
  --text: 'Inter', 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --gutter: clamp(18px, 5vw, 56px);
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 32px -18px rgba(0,0,0,.25);
  --name-size: clamp(44px, 8vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.pk {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* element defaults sit inside :where() so any class rule, here or in a theme, beats them */
:where(.pk) h1, :where(.pk) h2, :where(.pk) h3 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; color: var(--ink); }
:where(.pk) p { margin: 0; }
:where(.pk) ul, :where(.pk) ol { margin: 0; padding: 0; list-style: none; }
:where(.pk) a { color: var(--accent); }

/* ---------- sample banner (shared by every example) ---------- */

.cvf-banner {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px;
  min-height: 40px; padding: 7px var(--gutter);
  background: rgba(6, 9, 22, .92); color: #E6E9F5;
  font: 13px/1.4 'Inter', 'Segoe UI', Arial, sans-serif;
}
.cvf-banner strong { color: #fff; }
.cvf-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.cvf-banner a { color: #5EEAD4; text-decoration: none; }
.cvf-banner a:hover { text-decoration: underline; }
.cvf-banner select {
  padding: 3px 26px 3px 10px;
  background: #131A33 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235EEAD4' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 9px center / 10px 7px;
  border: 1px solid rgba(94,234,212,.45); border-radius: 999px;
  color: #F2F4FC; font: 500 12.5px 'Inter', 'Segoe UI', Arial, sans-serif;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.cvf-banner select optgroup, .cvf-banner select option { background: #131A33; color: #F2F4FC; }
html.embedded .cvf-banner { display: none; }
html.embedded { scrollbar-width: none; }             /* previews scroll by moving the frame, not the page */
html.embedded::-webkit-scrollbar { display: none; }
/* on phones the banner wraps to two or three lines: let it scroll away, and pin only the nav */
@media (max-width: 760px) {
  .cvf-banner { position: relative; }
  .pk .pk-nav { top: 0; }
}

/* ---------- frame ---------- */

.pk-wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.pk-nav {
  position: sticky; top: 40px; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
html.embedded .pk-nav { top: 0; }
.pk-nav .pk-wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; }
.pk-mark { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink) !important; text-decoration: none; }
.pk-nav nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.pk-nav nav a { color: var(--ink-2); font-size: 14.5px; text-decoration: none; }
.pk-nav nav a:hover { color: var(--accent); }

.pk-section { padding-block: clamp(56px, 8vw, 110px); }
.pk-head { display: flex; flex-direction: column; gap: 10px; max-width: 60ch; margin-bottom: clamp(26px, 4vw, 44px); }
.pk-eyebrow { font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.pk-head h2 { font-size: clamp(30px, 4.2vw, 50px); }
.pk-head p:not(.pk-eyebrow) { color: var(--ink-2); font-size: 17.5px; }

/* ---------- hero ---------- */

.pk-hero { padding-block: clamp(56px, 9vw, 130px) clamp(40px, 6vw, 80px); }
.pk-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
.pk-hero-text { display: flex; flex-direction: column; gap: 20px; }
.pk-kicker { font: 500 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pk-name { font-size: var(--name-size); letter-spacing: -.035em; line-height: .95; }
.pk-name em { font-style: italic; font-weight: 400; color: var(--accent); }
.pk-headline { max-width: 36ch; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; color: var(--ink-2); }
.pk-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pk-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  background: var(--accent); color: var(--accent-ink) !important;
  border: 1px solid var(--accent); border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pk-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pk-ghost { background: transparent; color: var(--ink) !important; border-color: var(--line); }

.pk-portrait {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 4 / 5; border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
    radial-gradient(90% 90% at 90% 90%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pk-portrait span { font-family: var(--display); font-size: clamp(64px, 9vw, 120px); font-weight: 600; letter-spacing: -.04em; color: var(--ink); opacity: .9; }
.pk-portrait small { position: absolute; left: 16px; bottom: 14px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.pk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px; margin-top: clamp(34px, 5vw, 60px); padding-top: 26px; border-top: 1px solid var(--line); }
.pk-stats li { display: flex; flex-direction: column; gap: 4px; }
.pk-stats b { font-family: var(--display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; line-height: 1; color: var(--ink); }
.pk-stats span { font-size: 14px; color: var(--muted); }

/* ---------- selected work ---------- */

.pk-work { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(18px, 2.5vw, 28px); }
.pk-project {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease;
}
.pk-project:hover { transform: translateY(-4px); }
.pk-project-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; }
.pk-meta { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pk-project h3 { font-size: 24px; }
.pk-project-body :where(p:not(.pk-meta)) { color: var(--ink-2); font-size: 15.5px; }   /* one class of weight, so .pk-result can restyle */
.pk-result { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--ink); font-weight: 500; }
.pk-result::before { content: "\2192  "; color: var(--accent); }

/* covers: drawn, not photographed — two colours and a pattern per project */
.pk-cover {
  --c1: var(--accent); --c2: var(--accent-2);
  position: relative; display: flex; align-items: flex-end;
  aspect-ratio: 4 / 3; padding: 18px; overflow: hidden;
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  color: #fff;
}
.pk-cover-label {
  position: relative; z-index: 2;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(0,0,0,.35); backdrop-filter: blur(4px);
  font: 500 12px var(--mono); letter-spacing: .06em;
}
.pk-cover::before, .pk-cover::after { content: ""; position: absolute; pointer-events: none; }
/* frames: a strip of film */
.pk-cover[data-kind="frames"]::before {
  inset: 22% -10% auto -10%; height: 46%; transform: rotate(-6deg);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0 8px, transparent 8px 22px) top / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0 8px, transparent 8px 22px) bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 26%, rgba(0,0,0,.25) 26% 27%);
  border-block: 12px solid rgba(0,0,0,.55);
}
/* bars: a chart */
.pk-cover[data-kind="bars"]::before {
  left: 12%; right: 12%; bottom: 22%; height: 52%;
  background:
    linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)) 0% 100% / 12% 38% no-repeat,
    linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.7)) 22% 100% / 12% 58% no-repeat,
    linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)) 44% 100% / 12% 46% no-repeat,
    linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.7)) 66% 100% / 12% 78% no-repeat,
    linear-gradient(rgba(255,255,255,.95), rgba(255,255,255,.95)) 88% 100% / 12% 100% no-repeat;
}
/* grid: tiles, like a layout or a floor plan */
.pk-cover[data-kind="grid"]::before {
  inset: 14% 14% 26% 14%;
  background:
    linear-gradient(rgba(255,255,255,.3) 2px, transparent 2px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(255,255,255,.3) 2px, transparent 2px) 0 0 / 25% 100%;
  border: 2px solid rgba(255,255,255,.5);
}
.pk-cover[data-kind="grid"]::after { left: 39%; top: 38%; width: 25%; height: 22%; background: rgba(255,255,255,.85); }
/* lines: pages of text */
.pk-cover[data-kind="lines"]::before {
  left: 18%; right: 18%; top: 14%; bottom: 26%;
  background: #fff;
  box-shadow: 10px 10px 0 rgba(0,0,0,.18);
}
.pk-cover[data-kind="lines"]::after {
  left: 24%; right: 26%; top: 22%; bottom: 34%;
  background: repeating-linear-gradient(transparent 0 10px, rgba(0,0,0,.18) 10px 13px);
}
/* orb: a single bold shape */
.pk-cover[data-kind="orb"]::before {
  width: 62%; aspect-ratio: 1; right: -8%; top: -10%; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.9), rgba(255,255,255,.15) 60%, transparent 70%);
}
.pk-cover[data-kind="orb"]::after { width: 40%; aspect-ratio: 1; left: -6%; bottom: -14%; border-radius: 50%; border: 10px solid rgba(255,255,255,.35); }

/* ---------- case study ---------- */

.pk-case-card { padding: clamp(24px, 4vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pk-case-card > .pk-meta { margin-bottom: 10px; }
.pk-case-card > h3 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 24px; }
.pk-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pk-step { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.pk-step b { font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pk-step p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- about, experience, tags, lists ---------- */

.pk-about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.pk-about-text { display: flex; flex-direction: column; gap: 16px; font-size: 18px; color: var(--ink-2); }
.pk-about-text p:first-child { font-family: var(--display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; color: var(--ink); }
.pk-facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pk-facts li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pk-facts span { color: var(--muted); }
.pk-facts b { font-weight: 600; text-align: right; }

.pk-timeline { display: flex; flex-direction: column; }
.pk-timeline li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.pk-timeline li:last-child { border-bottom: 1px solid var(--line); }
.pk-when { font: 500 13px var(--mono); color: var(--muted); padding-top: 4px; }
.pk-timeline h3 { font-size: 21px; }
.pk-org { margin: 2px 0 8px; color: var(--accent); font-weight: 500; }
.pk-timeline p:not(.pk-org) { color: var(--ink-2); font-size: 15.5px; }

.pk-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-tags li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14.5px; color: var(--ink-2); }

.pk-list { display: flex; flex-direction: column; }
.pk-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); }
.pk-list li:last-child { border-bottom: 1px solid var(--line); }
.pk-list b { font-weight: 600; }
.pk-list span { font: 500 13px var(--mono); color: var(--muted); white-space: nowrap; }
@media (max-width: 680px) {
  .pk-list li { grid-template-columns: 1fr; gap: 4px; }
  .pk-list span { white-space: normal; }
}

/* ---------- contact + footer ---------- */

.pk-contact .pk-contact-card { display: flex; flex-direction: column; gap: 18px; padding: clamp(28px, 5vw, 64px); background: var(--ink); color: var(--bg); border-radius: var(--radius); }
.pk-contact h2 { color: var(--bg); font-size: clamp(34px, 5vw, 64px); }
.pk-contact-line { font-family: var(--display); font-size: clamp(20px, 2.6vw, 30px); word-break: break-word; }
.pk-contact-list { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 15px; opacity: .85; }
.pk-contact .pk-note { font-size: 13px; opacity: .6; }

.pk-foot { padding: 34px var(--gutter) 48px; text-align: center; font-size: 13.5px; color: var(--muted); }
.pk-foot a { color: var(--accent); }

/* ---------- motion: reveal on scroll (kit.js adds .pk-js) ---------- */

.pk-js .pk-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.pk-js .pk-reveal.in { opacity: 1; transform: none; }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .pk-hero-grid, .pk-about { grid-template-columns: 1fr; }
  .pk-portrait { max-width: 320px; aspect-ratio: 1; }
  .pk-steps { grid-template-columns: 1fr; }
  .pk-timeline li { grid-template-columns: 1fr; gap: 6px; }
  .pk-nav nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pk-js .pk-reveal { opacity: 1; transform: none; transition: none; }
  .pk-project, .pk-btn { transition: none; }
  .pk-project:hover, .pk-btn:hover { transform: none; }
}
@media print {
  .cvf-banner, .pk-nav { display: none; }
}
