/* Layout: the homepage is one stage (the cube) with a slim header; every other page is a single reading column. One cobalt accent, a purple core, ink on cool paper. */
:root {
  --paper: #f2f3ef;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #5b606b;
  --line: #d9dbd4;
  --grid: #2742c9;
  --accent: #2742c9;
  --accent-ink: #ffffff;
  --orb: #7b3fe4;
  --tag: #fff1b8;
  --tag-ink: #5a4500;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 6vw, 4rem);
  --radius: 10px;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101217;
    --surface: #1a1d25;
    --ink: #eceef2;
    --muted: #a0a6b3;
    --line: #2c303a;
    --grid: #8fa2ff;
    --accent: #8fa2ff;
    --accent-ink: #0d1020;
    --orb: #a77bff;
    --tag: #3d3410;
    --tag-ink: #ffe27a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101217;
  --surface: #1a1d25;
  --ink: #eceef2;
  --muted: #a0a6b3;
  --line: #2c303a;
  --grid: #8fa2ff;
  --accent: #8fa2ff;
  --accent-ink: #0d1020;
  --orb: #a77bff;
  --tag: #3d3410;
  --tag-ink: #ffe27a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.ph {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--tag);
  color: var(--tag-ink);
  padding: 0.1em 0.5em;
  border-radius: 4px;
  vertical-align: middle;
}
.label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Home: the cube sits in a white studio void. The void stays light in both themes on purpose. */
.stage {
  --void-hi: #ffffff;
  --void-mid: #eceded;
  --void-lo: #c9cbcf;
  --void-ink: #1d1f24;
  --void-muted: #6b6e76;
  position: relative;
  height: clamp(460px, 74vh, 780px);
  max-width: 100%;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  color: var(--void-ink);
  background:
    radial-gradient(ellipse 55% 50% at 50% 40%, var(--void-hi) 0%, transparent 72%),
    radial-gradient(ellipse 90% 30% at 50% 92%, var(--void-hi) 0%, transparent 70%),
    radial-gradient(ellipse 130% 110% at 50% 45%, transparent 45%, var(--void-lo) 100%),
    linear-gradient(180deg, #dfe0e3 0%, var(--void-mid) 50%, #e2e3e6 66%, #f6f6f7 100%);
}
.void-intro { position: absolute; left: clamp(16px, 4vw, 40px); top: clamp(16px, 3vw, 32px); max-width: calc(100% - 32px); pointer-events: none; z-index: 2; }
.void-intro .label { color: var(--void-muted); }
.void-intro h1 { font-family: var(--font-display); font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 0; max-width: 18ch; text-wrap: balance; color: var(--void-ink); }
.stage canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; outline: none; }
.stage.is-hovering canvas { cursor: pointer; }
.frag-label {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, 0);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--void-ink);
  background: rgb(255 255 255 / 0.85);
  border: 1px solid #d4d6da;
  padding: 2px 8px; border-radius: 999px; z-index: 3;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.4s;
}
.frag-label.on { opacity: 1; }
.frag-label.core { color: #7a2cff; border-color: #b892ff; }

.preview {
  position: absolute; left: 0; top: 0; z-index: 5;
  width: 240px; max-width: calc(100% - 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.35);
  overflow: hidden;
  pointer-events: none;
}
.preview .pv-thumb {
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--line) 70%, transparent) 10px 11px),
    var(--paper);
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted);
}
.preview.is-core .pv-thumb { background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--orb) 55%, var(--surface)), var(--orb)); color: var(--accent-ink); }
.preview .pv-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.preview h3 { font-family: var(--font-display); font-size: 1.0625rem; margin: 0; line-height: 1.25; }
.preview p { margin: 0; font-size: 0.875rem; color: var(--muted); line-height: 1.45; }
.preview .pv-go { font-size: 0.8125rem; font-weight: 600; color: var(--accent); margin-top: 4px; }
.preview .pv-open { display: none; }
.preview.pinned {
  left: 50% !important; top: auto !important; bottom: 12px;
  transform: translateX(-50%);
  pointer-events: auto;
}
.preview.pinned .pv-go { display: none; }
.preview.pinned .pv-open {
  display: inline-flex; justify-content: center; margin-top: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 0.875rem; text-decoration: none;
}

.stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 8px 32px; border-bottom: 1px solid var(--line); }
.hint { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); margin: 0; }
.hint b { color: var(--ink); font-weight: 400; }
.reset { font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.jump { padding-block: 24px 48px; }
.jump ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.jump a { font-weight: 600; }
.no-webgl .stage { display: none; }

/* Inner pages */
.page { padding-block: clamp(32px, 6vw, 72px) clamp(48px, 8vw, 96px); }
.back { display: inline-block; margin-bottom: 24px; font-weight: 600; text-decoration: none; }
.page h1 { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.04; letter-spacing: -0.03em; margin: 8px 0 16px; max-width: 18ch; text-wrap: balance; }
.page .lede { font-size: var(--step-1); color: var(--muted); max-width: 56ch; margin: 0 0 32px; }
.page h2 { font-family: var(--font-display); font-size: var(--step-1); margin: 32px 0 8px; }
.page p { max-width: 64ch; }
.detail-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px 40px; align-items: start; }
@media (max-width: 760px) { .detail-top { grid-template-columns: 1fr; } }
.shot {
  aspect-ratio: 16 / 10; max-width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 70%, transparent) 14px 15px),
    var(--surface);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted);
}
.spec { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; padding: 16px 0; border-block: 1px solid var(--line); }
.spec dt { font-family: var(--font-mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 2px; }
.spec dd { margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 0.9375rem;
  border: 1.5px solid var(--ink); color: var(--ink);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.private { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line); display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.skills li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.875rem; }
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } .portrait { max-width: 260px; } }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--line); }
.service { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.service h2 { margin: 0 0 8px; }
.service p { margin: 0 0 12px; color: var(--muted); }
.price { font-family: var(--font-mono); font-size: var(--step--1); }

.contact-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 8px; }
.email { font-family: var(--font-mono); font-size: var(--step-1); user-select: all; word-break: break-all; }
.copy { font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.socials { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; list-style: none; padding: 0; }

.foot { padding-block: 24px; font-size: var(--step--1); color: var(--muted); }
