/* ─────────────────────────────────────────────────────────────────
   Adam / Makerlab — design tokens
   ───────────────────────────────────────────────────────────────── */

:root {
  /* palette — sky & peach (default) */
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --bg-tint: #f0f4f9;
  --fg: #1a1a1a;
  --fg-muted: #6b6b6b;
  --fg-faint: #a6a6a6;
  --border: #ececec;
  --border-strong: #d8d8d8;
  --blue: #9fbedb;
  --blue-soft: #e6eef7;
  --blue-deep: #6e9bc4;
  --orange: #ffc69a;
  --orange-soft: #fbe4d0;
  --orange-deep: #e89764;

  /* type */
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* spacing — balanced default */
  --pad-page: 64px;
  --pad-section-y: 96px;
  --pad-section-x: 64px;
  --gap: 32px;
  --gap-sm: 16px;
  --gap-lg: 56px;
  --content-max: 1280px;
  --radius: 6px;
  --radius-lg: 14px;
}

/* Palette variants */
[data-palette="mist-apricot"] {
  --bg: #fafafa; --bg-subtle: #f3f4f7; --bg-tint: #e9eef5;
  --blue: #bcd7ec; --blue-soft: #ecf3fa; --blue-deep: #82a8cd;
  --orange: #f5c79a; --orange-soft: #faead7; --orange-deep: #d99464;
  --fg: #2b2b2b;
}
[data-palette="cloud-coral"] {
  --bg: #fbfaf7; --bg-subtle: #f4f1ec; --bg-tint: #e9e3da;
  --blue: #cfe1ec; --blue-soft: #eef4f9; --blue-deep: #87a8bb;
  --orange: #f4b079; --orange-soft: #fadfc5; --orange-deep: #d68345;
  --fg: #3a3a3a;
}
[data-palette="paper-sun"] {
  --bg: #f5f7fa; --bg-subtle: #eaeef4; --bg-tint: #dde4ed;
  --blue: #a8c5e0; --blue-soft: #e0eaf3; --blue-deep: #6d92b6;
  --orange: #ffb98a; --orange-soft: #fcdcc2; --orange-deep: #e08850;
  --fg: #1f2937;
}

/* Font pairings */
[data-font="helvetica"] {
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
[data-font="inter"] {
  --font-display: "Inter", "Helvetica Neue", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;
}
[data-font="helvetica-mono"] {
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
[data-font="geist"] {
  --font-display: "Geist", "Helvetica Neue", sans-serif;
  --font-body: "Geist", "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}

/* Density */
[data-density="airy"] {
  --pad-page: 96px;
  --pad-section-y: 144px;
  --pad-section-x: 96px;
  --gap: 48px;
  --gap-lg: 80px;
}
[data-density="balanced"] {
  --pad-page: 64px;
  --pad-section-y: 96px;
  --pad-section-x: 64px;
  --gap: 32px;
  --gap-lg: 56px;
}
[data-density="dense"] {
  --pad-page: 40px;
  --pad-section-y: 56px;
  --pad-section-x: 40px;
  --gap: 20px;
  --gap-lg: 32px;
}

/* ─────────────────────────────────────────────────────────────────
   Base
   ───────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern";
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

::selection { background: var(--blue); color: var(--fg); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(32px, 4vw, 56px); }
h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.01em; }
h4 { font-size: 18px; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }

.mono { font-family: var(--font-mono); }

/* ─────────────────────────────────────────────────────────────────
   Layout primitives
   ───────────────────────────────────────────────────────────────── */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app[data-nav="sidebar"] { flex-direction: row; }

.shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad-section-x);
}

.section {
  padding: var(--pad-section-y) 0;
}
.section--tight { padding: calc(var(--pad-section-y) * 0.5) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue-deep);
  margin-right: 8px;
  vertical-align: middle;
  translate: 0 -1px;
}

.rule {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}

.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }

/* ─────────────────────────────────────────────────────────────────
   Header — variants
   ───────────────────────────────────────────────────────────────── */

.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.hdr__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px var(--pad-section-x);
  display: flex;
  align-items: center;
  gap: 24px;
}
.hdr__topline {
  display: contents;
}
.hdr__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.hdr__brand .mark {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--orange) 100%);
}
.hdr__menu-btn {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.hdr__menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--fg);
  border-radius: 999px;
  transition: transform .15s ease, opacity .15s ease;
}
.hdr__menu-btn.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hdr__menu-btn.is-open span:nth-child(2) { opacity: 0; }
.hdr__menu-btn.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.hdr__nav {
  display: flex; gap: 28px;
  font-size: 14px;
}
.hdr__nav a {
  color: var(--fg-muted);
  padding: 6px 0;
  position: relative;
  transition: color .15s ease;
}
.hdr__nav a:hover { color: var(--fg); }
.hdr__nav a.is-active { color: var(--fg); }
.hdr__nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--blue-deep);
  border-radius: 2px;
}
.hdr__cta {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .15s ease;
}
.hdr__cta:hover { transform: translateY(-1px); }
.hdr__cta .arrow { font-size: 14px; translate: 0 -1px; }

/* nav style: top-right (default) */
.app[data-nav="top-right"] .hdr__nav { margin-left: auto; }
.app[data-nav="top-right"] .hdr__cta { margin-left: 24px; }

/* nav style: centered logo */
.app[data-nav="centered"] .hdr__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
}
.app[data-nav="centered"] .hdr__nav-left { display: flex; gap: 28px; font-size: 14px; }
.app[data-nav="centered"] .hdr__brand { justify-self: center; }
.app[data-nav="centered"] .hdr__nav-right { display: flex; gap: 28px; font-size: 14px; justify-self: end; }
.app[data-nav="centered"] .hdr__cta { display: none; }

/* nav style: minimal (wordmark + link row beneath) */
.app[data-nav="minimal"] .hdr { border-bottom: 0; backdrop-filter: none; background: var(--bg); }
.app[data-nav="minimal"] .hdr__inner {
  flex-direction: column;
  align-items: flex-start;
  padding-top: 32px;
  padding-bottom: 0;
  gap: 18px;
}
.app[data-nav="minimal"] .hdr__brand { font-size: 22px; }
.app[data-nav="minimal"] .hdr__nav { gap: 24px; font-size: 13px; }
.app[data-nav="minimal"] .hdr__nav a { padding-bottom: 14px; border-bottom: 1px solid transparent; }
.app[data-nav="minimal"] .hdr__nav a.is-active { border-bottom-color: var(--fg); }
.app[data-nav="minimal"] .hdr__nav a.is-active::after { display: none; }
.app[data-nav="minimal"] .hdr__cta { display: none; }

/* nav style: sidebar */
.app[data-nav="sidebar"] .hdr {
  position: sticky;
  top: 0;
  width: 240px;
  height: 100vh;
  border-right: 1px solid var(--border);
  border-bottom: 0;
  background: var(--bg);
  flex-shrink: 0;
}
.app[data-nav="sidebar"] .hdr__inner {
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 32px;
  height: 100%;
  max-width: none;
}
.app[data-nav="sidebar"] .hdr__brand { font-size: 18px; }
.app[data-nav="sidebar"] .hdr__nav { flex-direction: column; gap: 14px; margin-top: 32px; }
.app[data-nav="sidebar"] .hdr__nav a.is-active::after { display: none; }
.app[data-nav="sidebar"] .hdr__nav a.is-active { font-weight: 600; }
.app[data-nav="sidebar"] .hdr__cta { margin-left: 0; margin-top: auto; }

/* ─────────────────────────────────────────────────────────────────
   Buttons + chips
   ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  background: var(--fg);
  color: var(--bg);
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg-subtle); }
.btn--blue { background: var(--blue-deep); color: #fff; }
.btn--orange { background: var(--orange-deep); color: #fff; }
.btn .arrow { translate: 0 -1px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.chip--blue { background: var(--blue-soft); border-color: transparent; color: var(--blue-deep); }
.chip--orange { background: var(--orange-soft); border-color: transparent; color: var(--orange-deep); }

/* ─────────────────────────────────────────────────────────────────
   Placeholder image
   ───────────────────────────────────────────────────────────────── */

.ph {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(
      45deg,
      var(--blue-soft) 0,
      var(--blue-soft) 14px,
      var(--bg-subtle) 14px,
      var(--bg-subtle) 28px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.ph__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.ph__img--protected {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ph--orange {
  background:
    repeating-linear-gradient(
      45deg,
      var(--orange-soft) 0,
      var(--orange-soft) 14px,
      var(--bg-subtle) 14px,
      var(--bg-subtle) 28px
    );
}
.ph--mixed {
  background:
    repeating-linear-gradient(
      45deg,
      var(--blue-soft) 0,
      var(--blue-soft) 14px,
      var(--orange-soft) 14px,
      var(--orange-soft) 28px
    );
}
.ph.ph--media,
.ph.ph--media.ph--orange,
.ph.ph--media.ph--mixed {
  background: transparent;
}
.ph__label {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--fg-muted);
  text-transform: lowercase;
}
.ph__corner {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 1;
  font-size: 10px;
  color: var(--fg-faint);
  background: var(--bg);
  padding: 3px 7px;
  border-radius: 3px;
}

/* ─────────────────────────────────────────────────────────────────
   Cards
   ───────────────────────────────────────────────────────────────── */

.card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .25s ease;
}
.card:hover { transform: translateY(-4px); }
.card .ph { transition: transform .4s ease; }
.card:hover .ph > .ph__img { transform: scale(1.04); }

.card__meta {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}
.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.card__sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 4px;
}
.card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
}

/* Projects mosaic — featured + stacked (default) */
.mosaic {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--gap);
}
.mosaic__rail {
  display: flex; flex-direction: column;
  gap: var(--gap);
}
.mosaic .card--feature .ph { aspect-ratio: 4 / 3.4; }
.mosaic__rail .card .ph { aspect-ratio: 4 / 2.6; }

/* Grid 3-col */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.grid-3 .card .ph { aspect-ratio: 4 / 3.4; }

/* List */
.list { display: flex; flex-direction: column; }
.list .card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.list .card:last-child { border-bottom: 1px solid var(--border); }
.list .card:hover { transform: none; background: var(--bg-subtle); }
.list .card .ph { aspect-ratio: 4 / 3; }
.list .card__meta { display: contents; }
.list .card .row-title { font-size: 22px; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.list .card .row-sub { color: var(--fg-muted); font-size: 14px; margin-top: 4px; }
.list .card .row-tag {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-faint); letter-spacing: 0.08em; text-transform: uppercase;
}

/* Two-col featured */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: start;
}
.split .card .ph { aspect-ratio: 4 / 3.2; }

/* ─────────────────────────────────────────────────────────────────
   Hero variants
   ───────────────────────────────────────────────────────────────── */

.hero { padding: clamp(48px, 8vw, 120px) 0 var(--pad-section-y); }
.hero h1 .pill {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue-deep);
  padding: 0 14px;
  border-radius: 100px;
  font-size: 0.7em;
  vertical-align: middle;
  margin-right: 8px;
}
.hero__sub {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--fg-muted);
  max-width: 560px;
  margin-top: 28px;
  line-height: 1.45;
}
.hero__cta { margin-top: 36px; display: flex; gap: 12px; }

.hero--text h1 { max-width: 14ch; }

.hero--photo {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--gap-lg);
  align-items: end;
}
.hero--photo .ph { aspect-ratio: 4 / 5; }

.hero--shapes { position: relative; }
.hero--shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.hero--shapes .shape--a { width: 280px; height: 280px; background: var(--blue-soft); top: -40px; right: 4%; }
.hero--shapes .shape--b { width: 200px; height: 200px; background: var(--orange-soft); top: 220px; right: 18%; }
.hero--shapes .shape--c {
  width: 120px; height: 120px; background: transparent;
  border: 1.5px solid var(--blue); right: 30%; top: 80px;
}
.hero--shapes h1, .hero--shapes .hero__sub, .hero--shapes .hero__cta, .hero--shapes .hero__meta { position: relative; z-index: 1; }

.hero--asym {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
  align-items: end;
}
.hero--asym .hero__copy { grid-column: 1 / span 2; }
.hero--asym .hero__photo { grid-column: 3; }
.hero--asym h1 { font-size: clamp(40px, 6vw, 80px); }
.hero--asym .ph { aspect-ratio: 3 / 4; }

.hero__meta {
  display: flex; gap: 36px; margin-top: 56px;
  flex-wrap: wrap;
}
.hero__meta-item { font-size: 13px; color: var(--fg-muted); }
.hero__meta-item b { display: block; color: var(--fg); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }

/* ─────────────────────────────────────────────────────────────────
   Resume
   ───────────────────────────────────────────────────────────────── */

.resume {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--gap-lg);
  align-items: start;
}
.resume__side {
  position: sticky; top: 100px;
  font-size: 13px;
  color: var(--fg-muted);
}
.resume__side h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 10px;
  font-weight: 500;
}
.resume__side ul { list-style: none; padding: 0; margin: 0 0 28px 0; }
.resume__side li { padding: 4px 0; }
.resume__side a:hover { color: var(--fg); }

.resume__main { display: flex; flex-direction: column; gap: 64px; }

.entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 32px;
}
.entry__when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  padding-top: 4px;
}
.entry__title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.entry__org { color: var(--fg-muted); margin-top: 2px; font-size: 14px; }
.entry__body { margin-top: 10px; font-size: 15px; color: var(--fg); }
.entry__body ul { margin: 8px 0 0 0; padding-left: 18px; }
.entry__body li { margin: 4px 0; }
.entry__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ─────────────────────────────────────────────────────────────────
   About
   ───────────────────────────────────────────────────────────────── */

.about {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--gap-lg);
  align-items: start;
}
.about__photo .ph { aspect-ratio: 4 / 5; }
.about__lede {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.about__body { margin-top: 28px; font-size: 16px; color: var(--fg-muted); line-height: 1.7; max-width: 56ch; }
.about__body p + p { margin-top: 16px; }
.about__facts {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
  font-size: 14px;
}
.about__facts dt {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--fg-faint);
  margin-bottom: 4px;
}
.about__facts dd { margin: 0; color: var(--fg); }

/* ─────────────────────────────────────────────────────────────────
   Photography gallery
   ───────────────────────────────────────────────────────────────── */

.photo-masonry {
  column-count: 3;
  column-gap: var(--gap-sm);
}
.photo-masonry__item {
  break-inside: avoid;
  margin: 0 0 var(--gap-sm);
}
.photo-masonry__frame {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: #f4f4f4;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.photo-masonry,
.photo-masonry * {
  user-select: none;
  -webkit-user-select: none;
}

/* ─────────────────────────────────────────────────────────────────
   Contact
   ───────────────────────────────────────────────────────────────── */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: start;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field input, .field textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.field textarea { min-height: 140px; resize: vertical; }
.contact__channels {
  display: flex; flex-direction: column; gap: 12px;
  font-size: 14px;
}
.contact__channels .row {
  display: flex; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.contact__channels .row:last-child { border-bottom: 1px solid var(--border); }
.contact__channels .key { color: var(--fg-muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; }

.icon-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.icon-links--grid {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  gap: 12px;
  align-items: start;
  justify-content: start;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.icon-link:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}
.icon-link svg {
  width: 18px;
  height: 18px;
}

/* ─────────────────────────────────────────────────────────────────
   Shop / Makerlab
   ───────────────────────────────────────────────────────────────── */

.shop-toolbar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--gap-lg);
}
.shop-toolbar .tools { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--fg-muted); }
.tab {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  color: var(--fg-muted);
  transition: all .15s ease;
}
.tab:hover { color: var(--fg); }
.tab.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tab .count { opacity: 0.55; margin-left: 6px; }

select.tools__select {
  font: inherit;
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--fg);
  cursor: pointer;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.shop-card .ph { aspect-ratio: 4 / 5; }
.shop-card__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 14px;
}
.shop-card__title { font-weight: 600; font-size: 16px; }
.shop-card__cat { font-size: 12px; color: var(--fg-muted); margin-top: 4px; }
.shop-card__price { font-family: var(--font-mono); font-size: 14px; color: var(--fg); }

.featured-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: var(--gap-lg);
}
.featured-strip .ph { aspect-ratio: 4 / 5; }
.featured-strip .card--feature .ph { aspect-ratio: 1.2; }

/* ─────────────────────────────────────────────────────────────────
   Breadcrumbs
   ───────────────────────────────────────────────────────────────── */

.breadcrumbs {
  display: flex; align-items: center;
  gap: 10px;
  padding: 24px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.breadcrumbs a {
  color: var(--fg-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.breadcrumbs a:hover { color: var(--fg); text-decoration-color: var(--fg); }
.breadcrumbs span { color: var(--fg-faint); }

/* ─────────────────────────────────────────────────────────────────
   Entity pages — full product / project view
   ───────────────────────────────────────────────────────────────── */

.entity {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--gap-lg);
  align-items: start;
  padding-top: 32px;
}
.entity__media .ph { width: 100%; }
.entity__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
  margin-top: var(--gap-sm);
}
.entity__side { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.entity__body { margin-top: 22px; font-size: 16px; line-height: 1.65; color: var(--fg); max-width: 56ch; }
.entity__body p + p { margin-top: 14px; }

.entity__details {
  margin: 32px 0 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 24px;
}
.entity__details > div { display: flex; flex-direction: column; gap: 4px; }
.entity__details dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.entity__details dd { margin: 0; font-size: 15px; color: var(--fg); }

.entity__cta { margin-top: 28px; }

/* ─────────────────────────────────────────────────────────────────
   Personal project gallery
   ───────────────────────────────────────────────────────────────── */

.project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-sm);
  align-items: start;
}
.project-gallery__main {
  min-width: 0;
}
.project-gallery__main .ph {
  width: 100%;
  background: #f4f4f4;
}
.project-gallery .ph__img {
  object-fit: contain;
  background: #f4f4f4;
}
.project-gallery__thumbs {
  display: flex;
  gap: var(--gap-sm);
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.project-gallery__thumb {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  flex: 0 0 180px;
  display: block;
}
.project-gallery__thumb .ph {
  width: 100%;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.project-gallery__thumb:hover .ph {
  transform: translateY(-2px);
}
.project-gallery__thumb.is-active .ph {
  box-shadow: 0 0 0 2px var(--blue-deep);
}

/* ─────────────────────────────────────────────────────────────────
   Interest capture
   ───────────────────────────────────────────────────────────────── */

.interest {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.interest--open { padding: 22px 24px; }
.interest--done { background: var(--blue-soft); border-color: transparent; }
.interest__row { display: flex; gap: 10px; align-items: center; }
.interest__note {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
  margin: 0;
}
.interest__done-line {
  font-size: 13px;
  color: var(--blue-deep);
  letter-spacing: 0.02em;
}
.interest__done-line b { color: var(--fg); font-weight: 600; }

/* ─────────────────────────────────────────────────────────────────
   Modal — quick view (legacy — unused now, kept for reference)
   ───────────────────────────────────────────────────────────────── */

.modal-bg {
  position: fixed; inset: 0;
  background: color-mix(in srgb, var(--fg) 28%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  animation: fadeIn .2s ease both;
}
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 1080px; width: 100%;
  max-height: calc(100vh - 64px);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,0.18);
  animation: rise .25s cubic-bezier(.2,.7,.2,1) both;
}
.modal__media .ph { width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; }
.modal__media { min-height: 480px; }
.modal__body { padding: 40px 44px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.modal__close {
  position: absolute; top: 18px; right: 22px;
  background: var(--bg); border: 1px solid var(--border);
  width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; font-size: 16px; color: var(--fg);
  display: flex; align-items: center; justify-content: center;
}
.modal__price { font-family: var(--font-mono); font-size: 20px; }
.modal__row { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); font-size: 14px; }
.modal__row .key { color: var(--fg-muted); font-family: var(--font-mono); font-size: 12px; }
.modal__cta { display: flex; gap: 10px; margin-top: 8px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ─────────────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────────────── */

.ftr {
  margin-top: var(--pad-section-y);
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.ftr__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad-section-x);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap);
}
.ftr h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: 14px;
}
.ftr ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ftr ul a { color: var(--fg-muted); }
.ftr ul a:hover { color: var(--fg); }
.ftr__brand { max-width: 320px; }
.ftr__brand p { font-size: 14px; color: var(--fg-muted); margin-top: 10px; line-height: 1.6; }
.ftr__copy {
  max-width: var(--content-max);
  margin: 48px auto 0;
  padding: 24px var(--pad-section-x) 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--fg-muted);
  font-family: var(--font-mono);
}

/* ─────────────────────────────────────────────────────────────────
   Cross-site banner / switch
   ───────────────────────────────────────────────────────────────── */

.crossbar {
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.crossbar__inner {
  max-width: var(--content-max); margin: 0 auto;
  padding: 8px var(--pad-section-x);
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
}
.crossbar a {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: underline; text-underline-offset: 3px;
}
[data-site="personal"] .crossbar { display: none; }

/* responsive */
@media (max-width: 1200px) {
  :root {
    --pad-section-x: 40px;
    --gap: 24px;
    --gap-lg: 40px;
  }
  .hero--asym {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  }
  .hero--asym .hero__copy { grid-column: 1; }
  .hero--asym .hero__photo { grid-column: 2; }
  .grid-3,
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .featured-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .featured-strip .card--feature {
    grid-column: 1 / -1;
  }
  .ftr__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (max-width: 960px) {
  :root {
    --pad-page: 32px;
    --pad-section-y: 72px;
    --pad-section-x: 24px;
    --gap: 20px;
    --gap-sm: 12px;
    --gap-lg: 28px;
  }
  h1 { font-size: clamp(38px, 10vw, 64px); }
  h2 { font-size: clamp(28px, 7vw, 44px); }
  .hdr {
    position: static;
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .hdr__inner {
    padding-top: 16px;
    padding-bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hdr__topline {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .hdr__brand {
    width: auto;
  }
  .hdr__menu-btn {
    display: inline-flex;
  }
  .hdr__nav {
    margin-left: 0 !important;
    width: 100%;
    display: none;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
    padding-top: 4px;
  }
  .hdr__nav.is-open { display: flex; }
  .hdr__nav a {
    white-space: normal;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-subtle);
  }
  .hdr__nav a.is-active::after {
    display: none;
  }
  .hero {
    padding-top: 40px;
  }
  .hero--photo,
  .hero--asym,
  .about,
  .contact,
  .resume,
  .entity,
  .ftr__inner,
  .split,
  .project-gallery {
    grid-template-columns: 1fr !important;
  }
  .hero--asym .hero__photo {
    grid-column: auto;
    order: -1;
    justify-self: start;
  }
  .hero--asym .hero__photo,
  .hero--photo .ph,
  .hero--asym .ph {
    max-width: 280px;
  }
  .hero__cta {
    flex-wrap: wrap;
    width: 100%;
  }
  .hero__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
  }
  .mosaic {
    grid-template-columns: 1fr;
  }
  .mosaic__rail {
    display: grid;
    grid-template-columns: 1fr;
  }
  .grid-3,
  .shop-grid,
  .featured-strip {
    grid-template-columns: 1fr;
  }
  .photo-masonry {
    column-count: 2;
  }
  .resume__side {
    position: static;
  }
  .entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .entity__media,
  .entity__side {
    min-width: 0;
  }
  .entity__details {
    grid-template-columns: 1fr;
  }
  .shop-toolbar {
    align-items: flex-start;
    padding-top: 12px;
    gap: 10px;
  }
  .shop-toolbar .tools {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .contact__channels .row {
    gap: 16px;
  }
  .ftr__copy {
    flex-direction: column;
    gap: 10px;
  }
  .ftr__inner {
    grid-template-columns: 1fr !important;
  }
  .modal { grid-template-columns: 1fr; }
  .modal__media { min-height: 280px; }
  .app[data-nav="sidebar"] { flex-direction: column; }
  .app[data-nav="sidebar"] .hdr { width: 100%; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--border); }
  .app[data-nav="sidebar"] .hdr__inner { flex-direction: row; }
  .app[data-nav="sidebar"] .hdr__nav { flex-direction: row; margin-top: 0; margin-left: auto; }
}

@media (max-width: 720px) {
  :root {
    --pad-section-x: 18px;
    --pad-section-y: 56px;
  }
  h1 {
    font-size: clamp(30px, 9vw, 46px);
  }
  h2 {
    font-size: clamp(24px, 7vw, 34px);
  }
  h3 {
    font-size: clamp(20px, 5.5vw, 26px);
  }
  .container {
    padding-left: var(--pad-section-x);
    padding-right: var(--pad-section-x);
  }
  .hdr__inner {
    gap: 10px;
  }
  .hdr__nav {
    gap: 8px;
    font-size: 12px;
  }
  .hdr__nav a {
    padding: 7px 10px;
  }
  .hero {
    padding-top: 28px;
  }
  .hero__sub {
    font-size: 16px;
    margin-top: 18px;
    line-height: 1.5;
  }
  .about__lede {
    font-size: clamp(20px, 6vw, 26px);
  }
  .about__body,
  .entity__body,
  .entry__body,
  .contact__channels,
  .contact p,
  .resume,
  .shop-card__title + .shop-card__cat,
  .card__sub {
    font-size: 14px;
  }
  .entity__body,
  .about__body {
    line-height: 1.6;
  }
  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }
  .card__meta,
  .shop-card__meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .list .card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }
  .list .card .row-tag {
    grid-column: auto;
  }
  .contact__channels .row {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }
  .entity__thumbs {
    grid-template-columns: 1fr 1fr;
  }
  .photo-masonry {
    column-count: 1;
  }
  .project-gallery__thumbs {
    display: flex;
  }
  .project-gallery__thumb { flex-basis: 132px; }
  .entity__details,
  .about__facts {
    grid-template-columns: 1fr;
  }
  .interest__row {
    flex-direction: column;
    align-items: stretch;
  }
  .breadcrumbs {
    flex-wrap: wrap;
    row-gap: 6px;
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  :root {
    --pad-page: 20px;
    --pad-section-x: 14px;
    --pad-section-y: 44px;
    --gap: 16px;
    --gap-lg: 22px;
  }
  body {
    font-size: 15px;
  }
  h1 {
    font-size: clamp(28px, 8vw, 38px);
  }
  h2 {
    font-size: clamp(22px, 6.5vw, 30px);
  }
  .hdr__brand {
    font-size: 15px;
  }
  .hdr__brand .mark {
    width: 18px;
    height: 18px;
  }
  .hero__sub,
  .about__body,
  .entity__body,
  .contact__channels,
  .entry__body {
    font-size: 14px;
  }
  .about__lede {
    font-size: 20px;
  }
  .card__title,
  .shop-card__title,
  .entry__title {
    font-size: 18px;
  }
  .entry__org,
  .card__sub,
  .shop-card__cat,
  .entity__details dd {
    font-size: 13px;
  }
  .hero__meta {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero__meta-item b {
    font-size: 16px;
  }
  .shop-toolbar {
    gap: 10px;
  }
  .tab {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .tools__select {
    width: 100%;
  }
  .shop-toolbar .tools {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .list .card {
    grid-template-columns: 1fr;
  }
  .list .card .row-tag {
    grid-column: auto;
  }
  .entity__thumbs {
    grid-template-columns: 1fr;
  }
  .about__photo .ph,
  .hero--photo .ph,
  .hero--asym .ph {
    max-width: 100%;
  }
  .ftr {
    padding-top: 40px;
  }
}
