/* Tartam Pluch: one stylesheet for the home page, the contact form and the
   résumé. Warm paper, harbor blue, coral and lagoon accents,
   Bricolage Grotesque for display and Atkinson Hyperlegible Next for text. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #faf7f0;
  --surface: #ffffff;
  --raised: #eeeee5;
  --side: #f4f3eb;
  --ink: #14212b;
  --text: #2a3a47;
  --muted: #56677a;
  --line: #dddcd3;
  --line-strong: #b5c4cf;
  --harbor: #0a6c94;
  --harbor-strong: #08577a;
  --harbor-soft: #dcecf4;
  --on-harbor: #ffffff;
  --lagoon: #127a72;
  --lagoon-ink: #0d5f58;
  --lagoon-soft: #daf0ec;
  --slate: #46586a;
  --slate-soft: #e6ecf0;
  --marigold: #e9a825;
  --marigold-ink: #6b4a00;
  --marigold-soft: #fbefd2;
  --coral: #a3422f;
  --coral-soft: #f7e6da;
  --on-coral: #ffffff;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --band: #14212b;
  --band-text: #e9eff3;
  --shadow: 0 1px 0 rgb(20 33 43 / 0.04), 0 28px 56px -32px rgb(20 33 43 / 0.38);

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius-lg: 22px;
  --radius: 12px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1820;
    --surface: #15232d;
    --raised: #1d2e3a;
    --side: #12202a;
    --ink: #eef3f6;
    --text: #d3dee6;
    --muted: #9aabb9;
    --line: #2a3c49;
    --line-strong: #3d5263;
    --harbor: #5cbde6;
    --harbor-strong: #8fd3f0;
    --harbor-soft: #133549;
    --on-harbor: #0e1820;
    --lagoon: #4fc7b9;
    --lagoon-ink: #86ddd2;
    --lagoon-soft: #11362f;
    --slate: #a9b8c5;
    --slate-soft: #24343f;
    --marigold: #f2be4a;
    --marigold-ink: #f6cf72;
    --marigold-soft: #382c10;
    --coral: #f5b39d;
    --coral-soft: #352722;
    --on-coral: #241b17;
    --danger: #ff8f85;
    --danger-soft: #3b1714;
    --band: #1d2e3a;
    --band-text: #e9eff3;
    --shadow: 0 1px 0 rgb(0 0 0 / 0.2), 0 28px 56px -30px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1820;
  --surface: #15232d;
  --raised: #1d2e3a;
  --side: #12202a;
  --ink: #eef3f6;
  --text: #d3dee6;
  --muted: #9aabb9;
  --line: #2a3c49;
  --line-strong: #3d5263;
  --harbor: #5cbde6;
  --harbor-strong: #8fd3f0;
  --harbor-soft: #133549;
  --on-harbor: #0e1820;
  --lagoon: #4fc7b9;
  --lagoon-ink: #86ddd2;
  --lagoon-soft: #11362f;
  --slate: #a9b8c5;
  --slate-soft: #24343f;
  --marigold: #f2be4a;
  --marigold-ink: #f6cf72;
  --marigold-soft: #382c10;
  --coral: #f5b39d;
    --coral-soft: #352722;
    --on-coral: #241b17;
    --danger: #ff8f85;
  --danger-soft: #3b1714;
  --band: #1d2e3a;
  --band-text: #e9eff3;
  --shadow: 0 1px 0 rgb(0 0 0 / 0.2), 0 28px 56px -30px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 1.5rem + 3.9vw, 4.4rem); font-weight: 720; line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 1.35rem + 1.7vw, 2.6rem); font-weight: 680; line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 650; line-height: 1.25; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--harbor);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--harbor-strong); }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}

.lead { font-size: 1.2rem; line-height: 1.6; max-width: 60ch; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-weight: 700;
}
.skip:focus { top: 12px; color: var(--paper); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 700 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover { background: var(--raised); color: var(--ink); }
.button-primary { background: var(--harbor); border-color: var(--harbor); color: var(--on-harbor); }
.button-primary:hover { background: var(--harbor-strong); border-color: var(--harbor-strong); color: var(--on-harbor); }
.button-accent { background: var(--marigold); border-color: var(--marigold); color: #14212b; }
.button-accent:hover { background: #f4c35a; border-color: #f4c35a; color: #14212b; }
.button-small { min-height: 38px; padding: 6px 14px; font-size: 0.92rem; }
.button:disabled { opacity: 0.7; cursor: progress; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav tools";
  align-items: center;
  gap: 12px 28px;
  min-height: 68px;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.mark { width: 45px; height: 36px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-nav { grid-area: nav; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--marigold); }

.site-tools { grid-area: tools; display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.lang-switch a {
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--paper); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-light { display: inline; }
  :root:not([data-theme="light"]) .theme-icon-dark { display: none; }
}

@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand tools" "nav nav";
    padding-block: 10px;
  }
  .site-nav ul { gap: 2px 20px; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 48px); }
.section-head h2 { margin-bottom: 14px; }

/* ---------- Services ---------- */

.services { background: var(--surface); border-block: 1px solid var(--line); }
.service-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) { .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.service {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 18px;
  align-items: start;
}
.service-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--harbor-soft);
  color: var(--harbor-strong);
}
.service-icon .icon { width: 26px; height: 26px; }
/* The title's first line is centered on the 48 px icon. */
.service h3 { grid-column: 2; grid-row: 1; margin: 10px 0 6px; line-height: 28px; }
.service p { grid-column: 2; grid-row: 2; margin: 0; max-width: 58ch; }

/* ---------- Projects ---------- */

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 860px) { .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.tile-art {
  padding: clamp(20px, 4vw, 32px);
  background: var(--harbor-soft);
}
.tile:nth-child(4n + 2) .tile-art { background: var(--marigold-soft); }
.tile:nth-child(4n + 3) .tile-art { background: var(--lagoon-soft); }
.tile:nth-child(4n + 4) .tile-art { background: var(--slate-soft); }
.tile-body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: clamp(20px, 3vw, 28px); }
.tile-body p { margin: 0; }
.tile-body .project-links { margin-top: auto; }

.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-live { background: var(--lagoon-soft); color: var(--lagoon-ink); }
.status-open { background: var(--harbor-soft); color: var(--harbor-strong); }
.status-design { background: var(--marigold-soft); color: var(--marigold-ink); }

.tags {
  display: flex;
  flex-wrap: wrap;
  /* Never stretched by a taller grid row: a lone tag would grow into a block. */
  align-items: flex-start;
  align-self: start;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 1px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}
.tags-loose { gap: 8px; }
.tags-loose li { padding: 4px 12px; background: var(--paper); font-size: 0.92rem; color: var(--text); }

.project-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: none;
}
.project-link:hover { text-decoration: underline; }

.project-list { margin: 40px 0 0; padding: 0; list-style: none; }
.project-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas: "thumb head" "text text" "tags tags" "links links";
  gap: 10px 16px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
}
.project-row:last-child { border-bottom: 1px solid var(--line); }
.project-row .project-text { grid-area: text; margin: 0; max-width: 68ch; }
.project-row .project-head { grid-area: head; }
.project-row .tags { grid-area: tags; }
.project-row .project-links { grid-area: links; }
.project-thumb {
  grid-area: thumb;
  align-self: start;
  width: 72px;
  padding: 6px;
  border-radius: 12px;
  background: var(--harbor-soft);
}
.project-row:nth-child(3n + 2) .project-thumb { background: var(--marigold-soft); }
.project-row:nth-child(3n + 3) .project-thumb { background: var(--lagoon-soft); }
.thumb-art { display: block; width: 100%; height: auto; }
@media (min-width: 900px) {
  .project-row {
    grid-template-columns: 88px minmax(0, 15rem) minmax(0, 1fr) auto;
    grid-template-areas: "thumb head text links" "thumb head tags links";
    column-gap: 28px;
  }
  .project-thumb { width: 88px; }
  .project-row .project-head { grid-area: head; align-self: start; flex-direction: column; align-items: flex-start; }
  .project-row .project-text { grid-area: text; }
  .project-row .tags { grid-area: tags; }
  .project-row .project-links { grid-area: links; flex-direction: column; align-self: start; }
}
.project-private { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.92rem; font-weight: 650; }
.status-inuse { background: var(--lagoon-soft); color: var(--lagoon-ink); }
.status-planned { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.all-repos { margin-top: 28px; }
.all-repos a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

.art { display: block; width: 100%; max-width: 320px; height: auto; margin-inline: auto; }
.art-body { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.art-screen { fill: var(--paper); }
.art-ink { fill: var(--ink); }
.art-stroke-ink { stroke: var(--ink); }
.art-wave path { stroke: var(--harbor); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 7; }
.art-frame { stroke: var(--marigold); stroke-width: 2.5; stroke-dasharray: 7 4; }
.art-track { fill: var(--line); }
.art-progress { fill: var(--lagoon); }
.art-label { fill: var(--marigold); }
.art-handwriting { stroke: #14212b; stroke-width: 2; stroke-linecap: round; }
.art-reel { fill: var(--paper); }
.art-spokes line { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.art-screw { fill: var(--muted); }
.art-ground { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.art-gate { stroke: var(--surface); stroke-width: 2; }
.art-pole { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.art-divider { stroke: var(--ink); stroke-width: 2; fill: none; }
.art-dot { fill: var(--line-strong); }
.art-line { fill: var(--line-strong); }
.art-graph path { stroke: var(--harbor); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.art-node { fill: var(--surface); stroke: var(--harbor); stroke-width: 2.5; }
.art-node-accent { fill: var(--marigold); stroke: var(--ink); stroke-width: 2; }
.art-pulse { stroke: var(--harbor); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.art-ok { fill: var(--lagoon); }
.art-warn { fill: var(--marigold); }
.art-arrow { stroke: var(--harbor); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.art-shield { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.art-check { stroke: var(--lagoon); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.art-gear circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.art-gear path { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.art-blade { stroke: var(--harbor); stroke-width: 4; stroke-linecap: round; }
.art-prompt { stroke: var(--lagoon); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* ---------- About ---------- */

.about { background: var(--surface); border-top: 1px solid var(--line); }
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
@media (min-width: 900px) { .about-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; } }
.about-text h2 { margin-bottom: 18px; }
.about-text p { max-width: 62ch; }
.about-stack h3 { margin-bottom: 16px; font-size: 1.05rem; color: var(--muted); font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }

/* ---------- Call to action ---------- */

.cta { background: var(--band); color: var(--band-text); }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding-block: clamp(48px, 7vw, 80px);
}
.cta h2 { color: #f3f6f8; margin-bottom: 8px; }
.cta p { font-size: 1.15rem; }

/* ---------- Footer ---------- */

.site-footer { padding-block: 36px; color: var(--muted); font-size: 0.95rem; }
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.site-footer p { margin: 0; flex: 1 1 320px; }
.brand-small .mark { width: 35px; height: 28px; }
.brand-small .brand-name { font-size: 1.05rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--text); font-weight: 650; }

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-block: clamp(40px, 7vw, 88px);
}
@media (min-width: 960px) {
  .contact-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
}
.contact-portrait {
  display: block;
  width: 88px;
  height: 88px;
  margin-bottom: 24px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line);
}
.contact-layout.is-sent { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.sent-mascot { display: block; width: auto; height: 160px; margin-bottom: 20px; }
.contact-intro h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); margin-bottom: 18px; }

.panel {
  padding: clamp(20px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 700; }
.optional { color: var(--muted); font-weight: 400; }
.hint { margin: -2px 0 8px; color: var(--muted); font-size: 0.9rem; }
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}
.field textarea { min-height: 190px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus-visible,
.field textarea:focus-visible { border-color: var(--harbor); outline-offset: 1px; }
.field-invalid input,
.field-invalid textarea { border-color: var(--danger); }
.field-error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0 0 8px;
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 650;
}
.field-error .icon { margin-top: 0.2em; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 650;
}
.form-alert .icon { margin-top: 0.25em; }

.pow {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 4px 0 24px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--raised);
}
.pow > .icon { width: 24px; height: 24px; margin-top: 2px; color: var(--muted); }
.pow p { margin: 0; }
.pow .hint { margin-top: 2px; }
.pow-state { color: var(--muted); }
.pow[data-state="working"] > .icon { color: var(--harbor); animation: pulse 1s ease-in-out infinite alternate; }
.pow[data-state="done"] > .icon,
.pow[data-state="done"] .pow-state { color: var(--lagoon-ink); }
.pow[data-state="failed"] > .icon,
.pow[data-state="failed"] .pow-state { color: var(--danger); }
@keyframes pulse { to { opacity: 0.35; } }

.button-send { width: 100%; }
@media (min-width: 640px) { .button-send { width: auto; } }

/* ---------- Résumé ---------- */

.cv-wrap { padding-block: 28px 72px; }
.cv-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-bottom: 16px; }

.cv {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main" "side";
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 1024px) {
  .cv { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: "side main"; }
}
.cv-main { grid-area: main; padding: clamp(20px, 4vw, 44px); }
.cv-side { grid-area: side; padding: clamp(20px, 4vw, 36px); background: var(--side); border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .cv-side { border-top: 0; border-right: 1px solid var(--line); } }
@media (min-width: 700px) and (max-width: 1023px) {
  .cv-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
  .cv-side .cv-contact, .cv-side .cv-wide { grid-column: 1 / -1; }
  .contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
}

.cv-header { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
@media (min-width: 560px) { .cv-header { flex-direction: row; text-align: left; gap: 30px; } }
.cv-photo {
  width: 128px;
  height: 128px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--marigold);
}
.cv-header h1 { font-size: clamp(2.5rem, 1.9rem + 2.2vw, 3.5rem); }
.cv-headline { margin: 6px 0 0; color: var(--harbor); font-family: var(--font-display); font-size: 1.5rem; font-weight: 620; line-height: 1.25; }
.cv-subline { margin: 2px 0 0; color: var(--lagoon-ink); font-family: var(--font-display); font-size: 1.2rem; font-weight: 560; }

.cv-section h2 { margin: 40px 0 16px; font-size: 1.65rem; }
.cv-profile { max-width: 72ch; }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 0;
  left: 9px;
  width: 2px;
  background: var(--line);
}
.job { position: relative; padding-left: 38px; }
.job + .job { margin-top: 36px; }
.job::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 20px;
  height: 20px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--harbor);
}
.job-dates { margin: 0; color: var(--muted); font-size: 0.92rem; font-weight: 650; }
.job-duration { color: var(--muted); font-size: 0.8rem; font-weight: 400; white-space: nowrap; }
.job h3 { margin-top: 2px; font-size: 1.22rem; }
.job-company { margin: 2px 0 0; color: var(--muted); font-weight: 700; }
.job-company a, .education-where a { color: inherit; }
.job-company a:hover, .education-where a:hover { color: var(--harbor); }
.job-tasks { margin: 10px 0 0; padding-left: 1.2em; }
.job-tasks li + li { margin-top: 2px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0 0.6rem;
  border: 1px solid var(--tone);
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 13%, var(--surface));
  color: var(--tone-ink);
  font-size: 0.84rem;
  line-height: 1.3;
}
.badge-main { border-width: 2px; font-weight: 700; }
.badge a { color: inherit; text-decoration: none; }
.badge a:hover { text-decoration: underline; }

.tone-sky { --tone: var(--harbor); --tone-ink: var(--harbor-strong); }
.tone-cyan { --tone: var(--lagoon); --tone-ink: var(--lagoon-ink); }
.tone-slate { --tone: var(--slate); --tone-ink: var(--slate); }
.tone-teal { --tone: var(--marigold); --tone-ink: var(--marigold-ink); }
.cv-block { --tone: var(--harbor); --tone-ink: var(--harbor-strong); margin-top: 34px; }
.cv-block.tone-sky { --tone: var(--harbor); }
.cv-block.tone-cyan { --tone: var(--lagoon); }
.cv-block.tone-slate { --tone: var(--slate); }
.cv-block.tone-teal { --tone: var(--marigold); }
.cv-side > .cv-block:first-child { margin-top: 0; }
@media (min-width: 700px) and (max-width: 1023px) {
  .cv-side > .cv-block:nth-child(2) { margin-top: 34px; }
}
.cv-block h2 {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tone);
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}

.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 12px; padding-block: 5px; }
.contact-list .icon { color: var(--harbor); width: 20px; height: 20px; }
.contact-list a { color: inherit; text-decoration: none; }
.contact-list a:hover { color: var(--harbor); text-decoration: underline; }

.skills { margin: 0; padding: 0; list-style: none; }
.skills li + li { margin-top: 12px; }
.skill-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 5px; }
.skill-level { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.meter { height: 8px; overflow: hidden; border-radius: 999px; background: var(--line); }
.meter-fill { display: block; height: 100%; border-radius: 999px; background: var(--tone); }
.w-10 { width: 10%; } .w-20 { width: 20%; } .w-30 { width: 30%; } .w-40 { width: 40%; } .w-50 { width: 50%; }
.w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; }

.education, .languages { margin: 0; padding: 0; list-style: none; }
.education li + li { margin-top: 14px; }
.education-title { margin: 0; color: var(--ink); font-weight: 700; }
.education-where { margin: 0; color: var(--muted); }
.languages li + li { margin-top: 4px; }
.languages strong { color: var(--ink); }

.personal-project + .personal-project { margin-top: 22px; }
.personal-project h3 { font-size: 1.08rem; margin-bottom: 4px; }
.personal-project p { margin: 0; color: var(--text); }

/* ---------- Personal workshop ---------- */
.eyebrow { color: var(--coral); font-size: .8rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.hero { position: relative; padding-block: clamp(48px, 7vw, 90px) 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-text { padding-top: 0; }
.hero h1 { max-width: 17ch; margin-bottom: 26px; font-size: clamp(2.8rem, 1.3rem + 3.5vw, 4.7rem); line-height: 1.04; letter-spacing: -.045em; text-wrap: initial; }
.hero h1 span { display: block; color: var(--harbor); }
.hero .lead { max-width: 48ch; margin-bottom: 18px; }
.hero-intro { max-width: 54ch; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.workshop-portrait { margin: 0; min-width: 0; }
.portrait-stage { position: relative; display: grid; place-items: center; min-height: 410px; isolation: isolate; }
.hero-portrait { width: 310px; height: 350px; border-radius: 46% 46% 35% 35%; object-fit: cover; border: 8px solid var(--surface); box-shadow: 12px 16px 0 var(--coral-soft); }
.orbit { position: absolute; z-index: -1; width: 360px; height: 360px; border: 1px dashed var(--line-strong); border-radius: 50%; }
.orbit-two { width: 90%; max-width: 410px; height: 240px; border-style: solid; border-color: var(--lagoon); opacity: .35; }
.portrait-label { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: .83rem; font-weight: 650; box-shadow: 0 5px 16px rgb(20 33 43 / .06); }
.label-code { top: 38px; left: 0; background: var(--harbor-soft); }
.label-learn { right: -2px; top: -4px; background: var(--marigold-soft); }
.label-share { left: 4px; bottom: 35px; background: var(--lagoon-soft); }
.hero-mascot { position: absolute; right: 0; bottom: -4px; width: 100px; height: auto; z-index: 2; }
.workshop-portrait figcaption { text-align: center; font-size: .84rem; color: var(--muted); margin-top: 18px; }
.portrait-note { display: block; color: var(--coral); font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; margin-bottom: 2px; }
.proof-strip { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 64px 0 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof-strip li { padding-left: 20px; border-left: 3px solid var(--coral); }
.proof-strip li:nth-child(2) { border-color: var(--harbor); }
.proof-strip li:nth-child(3) { border-color: var(--lagoon); }
.proof-strip strong { display: block; font-family: var(--font-display); color: var(--ink); font-size: 1.35rem; line-height: 1.2; }
.proof-strip span { display: block; color: var(--muted); font-size: .91rem; margin-top: 6px; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 65px; } }
@media (max-width: 959px) and (min-width: 640px) { .workshop-portrait { width: 440px; justify-self: center; } .hero h1 { max-width: 20ch; } }
@media (max-width: 639px) {
  .proof-strip { grid-template-columns: 1fr; gap: 22px; margin-top: 38px; }
  .portrait-stage { min-height: 350px; max-width: 350px; margin-inline: auto; }
  .hero-portrait { width: 245px; height: 280px; }
  .orbit { width: 290px; height: 290px; } .orbit-two { width: min(65vw, 250px); height: 160px; }
  .portrait-label { padding: 6px 9px; font-size: .73rem; }
  .label-code { top: 24px; } .label-learn { top: -6px; } .label-share { bottom: 23px; }
  .hero-mascot { width: 80px; }
}
.projects .section-head { max-width: 700px; }
.tile { box-shadow: 0 3px 0 rgb(20 33 43 / .025); }
.tile-art { padding: 26px; }
.tile:nth-child(4n + 2) .tile-art { background: var(--coral-soft); }
.tile:nth-child(4n + 4) .tile-art { background: var(--marigold-soft); }
.tile h3 { font-size: 1.45rem; }
.project-drawer { margin-top: 32px; border-block: 1px solid var(--line-strong); }
.project-drawer summary { padding: 22px 0; cursor: pointer; color: var(--ink); font: 650 1.15rem var(--font-display); }
.project-drawer summary span { float: right; font-size: 1.5rem; color: var(--coral); }
.project-drawer[open] summary span { transform: rotate(45deg); }
.project-drawer .project-list { margin-top: 0; }
.project-drawer .project-row:last-child { border-bottom: 0; }
.projects-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; margin-top: 24px; color: var(--muted); font-size: .93rem; }
.projects-footer p { margin: 0; max-width: 52ch; }
.projects-footer a { font-weight: 700; }
.about { background: var(--surface); border-block: 1px solid var(--line); }
.career-notes { align-self: center; margin: 0; padding: 0 0 0 26px; border-left: 2px solid var(--line); }
.career-notes > div { position: relative; padding: 0 0 32px 10px; }
.career-notes > div:last-child { padding-bottom: 0; }
.career-notes > div::before { content: ''; position: absolute; left: -33px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 6px var(--surface); }
.career-notes > div:nth-child(2)::before { background: var(--harbor); }
.career-notes > div:nth-child(3)::before { background: var(--lagoon); }
.career-notes dt { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.career-notes dd { margin: 0; color: var(--muted); }
.method { background: #153b43; color: #e2efed; }
.method .eyebrow { color: #fac576; }
.method h2, .method h3 { color: #fffaf0; }
.method-intro { display: grid; gap: 32px; }
.method-intro h2 { max-width: 22ch; }
.method-intro p:last-child { color: #c1d7d4; }
.method-steps { list-style: none; display: grid; gap: 30px; margin: 42px 0 0; padding: 28px 0 0; border-top: 1px solid #4e7175; }
.method-steps h3 { font-size: 1.12rem; margin-bottom: 12px; }
.method-steps p { color: #c1d7d4; font-size: 1rem; }
.step-number { display: block; font: 600 2rem var(--font-display); color: #efb596; margin-bottom: 12px; }
.method-steps li:nth-child(2) .step-number { color: #a4d9c6; }
.method-steps li:nth-child(3) .step-number { color: #fac576; }
.method-note { margin-top: 32px; padding-top: 22px; border-top: 1px solid #4e7175; font-size: .94rem; color: #e2efed; }
@media (min-width: 800px) { .method-intro { grid-template-columns: 1fr 1fr; gap: 64px; } .method-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.services { background: var(--paper); border: 0; }
.service-list { gap: 32px; }
.service { display: block; border-top: 3px solid var(--harbor); padding-top: 24px; }
.service:nth-child(2) { border-color: var(--lagoon); }
.service:nth-child(3) { border-color: var(--coral); }
.service:nth-child(2) .service-icon { background: var(--lagoon-soft); color: var(--lagoon-ink); }
.service:nth-child(3) .service-icon { background: var(--coral-soft); color: var(--coral); }
.service h3 { line-height: 1.25; margin-block: 18px 12px; }
@media (min-width: 800px) { .service-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cta { background: var(--coral-soft); color: var(--text); border-top: 1px solid var(--line); }
.cta h2 { color: var(--ink); max-width: 24ch; }
.cta .button-accent { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.cta .button-accent:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cv-back { margin-right: auto; align-self: center; font-weight: 650; }
.cv-header { padding-bottom: 28px; border-bottom: 3px solid var(--coral); }
.cv-subline { font-family: var(--font-body); font-size: 1rem; max-width: 36ch; margin-top: 10px; }
.cv-side { background: var(--side); }
.cv-bridge { margin-top: 28px; padding: 20px 24px; background: var(--lagoon-soft); border-left: 3px solid var(--lagoon); border-radius: 0 12px 12px 0; }
.cv-bridge h2 { font-size: 1.18rem; margin-bottom: 10px; }
.cv-bridge p { font-size: .96rem; margin-bottom: 10px; }
.cv-bridge a { font-weight: 700; color: var(--lagoon-ink); }
.cv-project-link { display: inline-block; margin-top: 8px; font-weight: 650; font-size: .87rem; }
/* The level stays top right; a long skill name wraps onto a second line instead. */
.skill-head { flex-wrap: nowrap; align-items: flex-start; gap: 0 12px; }
.skill-name { flex: 1 1 auto; min-width: 0; }
.skill-level { flex: none; padding-top: 0.15em; }
.contact-reveal {
  padding: 2px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--harbor);
  font: 650 0.9rem var(--font-body);
  cursor: pointer;
}
.contact-reveal:hover { border-color: var(--harbor); }
.contact-reveal:disabled { color: var(--muted); cursor: progress; }
.skills li + li { margin-top: 8px; }
@media (max-width: 400px) { .site-header-inner { gap: 10px; } .brand { gap: 5px; } .brand-name { font-size: 1.08rem; } .site-tools { gap: 5px; } .lang-switch a { padding-inline: 7px; } .site-nav ul { gap: 0 16px; font-size: .9rem; } }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pow[data-state="working"] > .icon { animation: none; }
  .button { transition: none; }
}

/* ---------- Print (the résumé) ---------- */

@media print {
  @page { size: A4; margin: 0.7cm; }

  html:root[data-theme],
  html:root:not([data-theme]) {
    --coral: #a3422f;
    --coral-soft: #f7e6da;
    --lagoon-soft: #daf0ec;
    --paper: #ffffff;
    --surface: #ffffff;
    --raised: #e9eff3;
    --side: #f5f8fa;
    --ink: #14212b;
    --text: #2a3a47;
    --muted: #56677a;
    --line: #d3dde5;
    --harbor: #0a6c94;
    --harbor-strong: #08577a;
    --harbor-soft: #dcecf4;
    --lagoon: #127a72;
    --lagoon-ink: #0d5f58;
    --slate: #46586a;
    --marigold: #e9a825;
    --marigold-ink: #6b4a00;
    --shadow: none;
    color-scheme: light;
    font-size: 82%;
  }

  body { background: #fff; line-height: 1.45; }
  .bubble p, .job-tasks li + li { margin-top: 0; }
  .skills li + li { margin-top: 8px; }
  .cv-header h1 { font-size: 2.5rem; }
  .cv-header { padding-bottom: 16px; gap: 18px; }
  .cv-photo { width: 88px; height: 88px; }
  .cv-headline { font-size: 1.3rem; }
  .cv-subline { font-size: .9rem; }
  .cv-bridge { padding: 12px 14px; margin-top: 16px; }
  .cv-bridge h2 { font-size: 1rem; }
  .cv-bridge p { font-size: .88rem; }
  .cv-bridge { display: none; }
  .skip, .site-header, .site-footer, .cv-toolbar, .no-print { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .cv-wrap { padding: 0; }
  .cv {
    overflow: visible;
    grid-template-columns: 35% 65%;
    grid-template-areas: "side main";
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .cv-side { display: block; border: 0; padding: 1.25rem; }
  .cv-main { padding: 1.25rem 1.25rem 1.25rem 1.75rem; }
  .cv-side .cv-block { margin-top: 1.25rem; }
  .cv-side > .cv-block:first-child { margin-top: 0; }
  .contact-list { display: block; }
  .cv-header { flex-direction: row; text-align: left; }
  .cv-section h2 { margin: 1.25rem 0 0.6rem; }
  .job + .job { margin-top: 1.1rem; }
  .job, .cv-block, .personal-project, .skills li { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .badges { margin-top: 0.4rem; gap: 0.25rem; }
  .cv-side, .meter, .meter-fill, .badge, .job::before, .timeline::before, .cv-photo {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  a { text-decoration: none; }
}

/* Needs JavaScript (the résumé's contact details and PDF): hidden without it. */
:root:not(.js) .js-only { display: none !important; }

/* ---------- Inbox (owner only) ---------- */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.inbox { padding-block: clamp(32px, 6vw, 64px); }
.inbox-head h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); margin-bottom: 8px; }
.inbox-notice { margin: 20px 0 0; padding: 10px 14px; border-radius: var(--radius); background: var(--lagoon-soft); color: var(--lagoon-ink); font-weight: 650; }
.inbox-empty { margin-top: 32px; color: var(--muted); }
.inbox-bulk { margin-top: 24px; }
.inbox-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.inbox-message article { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.inbox-message-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.inbox-select input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--harbor); }
.inbox-meta h2 { font-size: 1.15rem; margin-bottom: 4px; }
.inbox-meta p { margin: 0; color: var(--text); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.inbox-date, .inbox-lang { color: var(--muted); font-size: 0.85rem; }
.inbox-state { padding: 1px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--harbor-soft); color: var(--harbor-strong); }
.inbox-state-spam, .inbox-state-held { background: var(--marigold-soft); color: var(--marigold-ink); }
.inbox-state-failed { background: var(--danger-soft); color: var(--danger); }
.inbox-body { margin: 14px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 80ch; }
.inbox-error { margin: 10px 0 0; color: var(--danger); font-size: 0.9rem; }
@media (max-width: 560px) {
  .inbox-message-head { grid-template-columns: auto minmax(0, 1fr); }
  .inbox-message-head form { grid-column: 2; }
}
