:root {
  --paper: #F6F3ED; --ink: #20252B; --slate: #526A78;
  --orange: #C66A3D; --orange-deep: #B25A31; --sage: #9AAA9A;
  --white: #FFFFFF; --hairline: #E3DDD0; --shadow: 0 1px 3px rgba(32,37,43,.07);
  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif; font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.overline { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); margin: 0; }

/* ===== top bar / nav ===== */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brandmark { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brandmark svg { display: block; }
.brandmark span { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { font-size: 15px; font-weight: 500; color: var(--slate); text-decoration: none; transition: color 160ms ease-out; }
.nav a:hover { color: var(--orange); }
.nav a[aria-current="page"] { color: var(--ink); }

/* ===== HERO: whiteboard pin-up ===== */
.hero { position: relative; padding-top: 30px; }

.hero-stage { position: relative; min-height: 620px; margin-top: 26px; }

.hero-copy { position: relative; z-index: 3; max-width: 560px; padding-top: 56px; }
.hero-role { margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.0; max-width: 12ch; margin-bottom: 26px; }
.hero h1 em { font-style: normal; position: relative; }
.hero-lead { font-size: 19px; max-width: 40ch; margin: 0 0 36px; }

/* the pinned, tilted portrait */
.portrait {
  position: absolute; top: 8px; right: 8px; width: 46%; max-width: 440px;
  display: block; margin: 0; cursor: pointer; z-index: 2;
  transform: rotate(4deg);
  transition: transform 220ms ease-out;
}
.portrait:hover { transform: rotate(-2deg) scale(1.01); }
.portrait-frame {
  position: relative; aspect-ratio: 1/1; overflow: hidden;
  background: var(--white); border: 1px solid var(--hairline); border-radius: 6px;
  box-shadow: 0 12px 30px rgba(32,37,43,.12);
}
.portrait-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  display: block; transition: opacity 200ms ease-out;
}
.p-holler { opacity: 0; background: var(--paper); }
.swap-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.portrait:hover .p-holler, .swap-toggle:checked ~ .portrait-frame .p-holler, .swap-toggle:focus-visible ~ .portrait-frame .p-holler { opacity: 1; }
.swap-toggle:focus-visible ~ .portrait-frame { outline: 2px solid var(--slate); outline-offset: 3px; }
/* hand-drawn wobbly outline offset behind the photo */
.portrait::before {
  content: ""; position: absolute; inset: -14px -12px -10px -14px;
  border: 1.5px dashed var(--slate); border-radius: var(--wobble);
  z-index: -1; opacity: .8;
}
/* pin dot */
.portrait::after {
  content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px;
  background: var(--slate); border-radius: 50%; transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(32,37,43,.3);
}

/* dashed connector: sweeps off the top, from the end of the overline,
   up and over, and lands on the photo. Fills the stage 1:1 at desktop. */
.connector {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  width: 100%; height: 100%;
}
/* flip caption riding the bottom of the tilted photo */
.cap {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ink);
  background: rgba(246,243,237,.92); border: 1px solid var(--hairline);
  padding: 9px 13px; transition: opacity 180ms ease-out;
}
.cap-holler { opacity: 0; }
.portrait:hover .cap-calm, .swap-toggle:checked ~ .portrait-frame .cap-calm { opacity: 0; }
.portrait:hover .cap-holler, .swap-toggle:checked ~ .portrait-frame .cap-holler { opacity: 1; }

.btn { display: inline-block; font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1; padding: 16px 24px; border-radius: 0; text-decoration: none; cursor: pointer; transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out, transform 120ms ease-out; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline:active { transform: translateY(1px); }

/* ===== shared lower sections ===== */
.work { padding: 40px 0 96px; }
.work-head { margin-bottom: 36px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--hairline); border-radius: 6px; box-shadow: var(--shadow); padding: 28px 26px 30px; transition: border-color 160ms ease-out, transform 120ms ease-out; }
.card:hover { border-color: var(--slate); transform: translateY(-2px); }
.card i { font-size: 26px; color: var(--slate); display: block; margin-bottom: 18px; }
.card .kicker { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); margin: 0 0 10px; }
.card h3 { font-size: 20px; line-height: 1.25; margin-bottom: 12px; }
.card p { margin: 0; font-size: 16px; }
.bio { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--hairline); max-width: 60ch; color: var(--slate); font-size: 17px; }

/* ===== PROJECTS: pinboard ===== */
.projects { padding: 8px 0 92px; }
.projects.is-page { padding-top: 44px; }
.projects-head { margin-bottom: 52px; max-width: 48ch; }
.projects-head .overline { margin-bottom: 16px; }
.projects h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; margin-bottom: 16px; }
.projects-lead { font-size: 18px; color: var(--slate); margin: 0; max-width: 46ch; }

.proj-featured { position: relative; display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 60px; align-items: center; }

.proj-meta { position: relative; z-index: 3; }
.proj-meta .overline { margin-bottom: 14px; }
.proj-meta h3 { font-size: 34px; line-height: 1.0; margin-bottom: 16px; }
.proj-desc { font-size: 17px; margin: 0 0 22px; max-width: 40ch; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.proj-tag { font-size: 12px; font-weight: 500; color: var(--slate); background: rgba(82,106,120,.07); border: 1px solid var(--hairline); border-radius: 3px; padding: 5px 10px; }
.proj-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.proj-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); }
.proj-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

/* pinned, tilted screenshot printout */
.proj-shot { position: relative; z-index: 2; display: block; text-decoration: none; transform: rotate(-2deg); transition: transform 220ms ease-out; }
.proj-shot:hover, .proj-shot:focus-visible { transform: rotate(0deg) scale(1.008); outline: none; }
.proj-frame { position: relative; background: var(--white); border: 1px solid var(--hairline); border-radius: 6px; box-shadow: 0 14px 34px rgba(32,37,43,.13); overflow: hidden; transition: box-shadow 200ms ease-out; }
.proj-shot:focus-visible .proj-frame { outline: 2px solid var(--slate); outline-offset: 4px; }
.proj-shot:hover .proj-frame { box-shadow: 0 20px 44px rgba(32,37,43,.16); }
.proj-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--hairline); background: #FBFAF5; }
.proj-bar span:not(.proj-url) { width: 9px; height: 9px; border-radius: 50%; background: #D8D1C2; }
.proj-url { margin-left: 8px; font-size: 12.5px; color: var(--slate); }
.proj-frame img { display: block; width: 100%; height: auto; }
/* hand-drawn wobbly outline offset behind the print */
.proj-shot::before { content: ""; position: absolute; inset: -14px -12px -12px -14px; border: 1.5px dashed var(--slate); border-radius: var(--wobble); z-index: -1; opacity: .72; }
/* pin dot */
.proj-shot::after { content: ""; position: absolute; top: -7px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--slate); box-shadow: 0 1px 3px rgba(32,37,43,.3); }

/* dashed connector sweeping from the copy into the printout */
.proj-connector { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }

/* quiet, honest "more coming" note */
.proj-next { margin-top: 56px; }
.proj-note { display: inline-block; max-width: 44ch; padding: 16px 20px; background: var(--white); border: 1.5px dashed var(--hairline); border-radius: 6px; transform: rotate(-0.8deg); }
.proj-note .overline { color: var(--slate); margin: 0 0 8px; }
.proj-note p { margin: 0; font-size: 15px; color: var(--slate); }

.contact { background: var(--ink); color: var(--paper); padding: 96px 0 104px; }
.contact .overline { color: var(--sage); margin-bottom: 20px; }
.contact h2 { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.12; margin-bottom: 22px; }
.contact p { max-width: 56ch; margin: 0 0 36px; color: var(--paper); }
.btn-cta { background: var(--orange); color: var(--white); border: 1.5px solid var(--orange); }
.btn-cta:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn-cta:active { transform: translateY(1px); }
.fineprint { margin: 28px 0 0; font-size: 14px; color: var(--sage); }

/* contact form (dark section) */
.form { max-width: 520px; margin: 0; }
.field { margin: 0 0 18px; }
.field label { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); margin: 0 0 8px; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--paper);
  background: rgba(246,243,237,.05); border: 1.5px solid rgba(246,243,237,.28);
  border-radius: 0; padding: 12px 14px;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: rgba(246,243,237,.4); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sage); background: rgba(246,243,237,.09); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-turnstile { margin: 6px 0 20px; }
.form-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status { font-size: 14px; margin: 0; min-height: 1.2em; }
.form-status.is-ok { color: var(--sage); }
.form-status.is-err { color: #E3A784; }
.form-status.is-pending { color: rgba(246,243,237,.6); }
.btn-cta[disabled] { opacity: .55; cursor: default; }

@media (max-width: 860px) {
  .hero-stage { min-height: 0; margin-top: 20px; }
  .hero-copy { max-width: none; padding-top: 8px; }
  .portrait { position: relative; right: auto; top: auto; width: 78%; max-width: 360px; margin: 40px auto 8px; transform: rotate(3deg); }
  .connector { display: none; }
  .cards { grid-template-columns: 1fr; }
  .work { padding: 24px 0 64px; }
  .projects { padding: 8px 0 64px; }
  .projects.is-page { padding-top: 32px; }
  .projects-head { margin-bottom: 36px; }
  .proj-featured { grid-template-columns: 1fr; gap: 44px; }
  .proj-connector { display: none; }
  .proj-shot { transform: rotate(-1.5deg); max-width: 440px; margin: 8px auto 0; }
  .proj-meta h3 { font-size: 30px; }
  .proj-next { margin-top: 44px; }
  .contact { padding: 72px 0 80px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .portrait { transform: rotate(3deg) !important; } }
