/* Portfolio v11 — ported from the Claude Design project.
   Base rules below are the design's own, plus the handful of defaults it
   inherits from its "Modernist" design-system stylesheet (box-sizing, body
   size and line-height, heading and paragraph defaults). */
:root { --bg: #f1ebdf; --ink: #1c1a17; --muted: #5f594f; --line: #cfc6b4; --accent: #2f6b4f; --tint: #e7dfcf; }

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Source Serif 4', serif; font-optical-sizing: auto; font-feature-settings: 'onum' 1;
  text-wrap: pretty; -webkit-font-smoothing: antialiased; transition: background .4s, color .4s;
}
body { font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600;
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 8px;
}
p { margin: 0 0 12px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
a {
  color: inherit; text-decoration: underline; text-decoration-color: var(--line);
  text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent); color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

.progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--accent);
  z-index: 20; transition: width .1s linear;
}
.page { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }

/* — buttons (the design's inline hover/active states) — */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  text-decoration: none; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 500;
  letter-spacing: 0; text-transform: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
}
.btn svg, .arrow-box svg { flex: none; }
.btn-primary, .btn-primary:hover {
  background: var(--ink); color: var(--bg); padding: 13px 20px;
  box-shadow: 0 3px 0 color-mix(in oklab, var(--ink) 55%, black), 0 6px 14px rgba(0, 0, 0, 0.16);
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.btn-secondary, .btn-secondary:hover {
  background: color-mix(in oklab, var(--bg) 50%, white); border: 1px solid var(--line); color: var(--ink);
  padding: 11px 18px; box-shadow: 0 2px 0 var(--line), 0 4px 10px rgba(0, 0, 0, 0.06);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--line), 0 8px 18px rgba(0, 0, 0, 0.09); }
.btn-secondary:active { transform: translateY(2px); box-shadow: 0 0 0 var(--line), 0 1px 2px rgba(0, 0, 0, 0.06); }
.btn-static { /* the look of .btn-secondary on a non-link (inside a link card) */
  background: color-mix(in oklab, var(--bg) 50%, white); border: 1px solid var(--line);
  box-shadow: 0 2px 0 var(--line), 0 4px 10px rgba(0, 0, 0, 0.06); padding: 11px 18px;
}
.arrow-box {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; align-self: center;
  background: color-mix(in oklab, var(--bg) 50%, white); border: 1px solid var(--line);
  box-shadow: 0 2px 0 var(--line), 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: transform .12s ease, box-shadow .12s ease;
}
.tool-btn { all: unset; cursor: pointer; }
.tool-btn:hover { background: var(--tint); }
.tool-btn.step:active { background: var(--line); }

/* — links that act as rows / cards — */
.row-link, .card-link { text-decoration: none; }
.row-link:hover, .card-link:hover { color: var(--accent); }

/* — image frames (the design's <image-slot>) — */
.slot { position: absolute; inset: 0; display: block; overflow: hidden; background: rgba(127, 127, 127, .08); }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 12px; font: 500 13px/1.3 system-ui, -apple-system, sans-serif;
  letter-spacing: .01em; opacity: .75; pointer-events: none;
}
.slot-empty svg { opacity: .45; }
.slot-ring { position: absolute; inset: 0; pointer-events: none; border: 1.5px dashed currentColor; opacity: .35; }

/* — reading view: rendered Markdown — */
.paras > div > * { margin: 0; }
.paras h2, .paras h3 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; letter-spacing: -0.018em; line-height: 1.1;
}
.paras h2 { font-size: 1.5em; margin-top: .6em; }
.paras h3 { font-size: 1.2em; margin-top: .4em; }
.paras ul, .paras ol { padding-left: 1.3em; display: grid; gap: .35em; }
.paras blockquote { border-left: 3px solid var(--accent); padding-left: 1em; font-style: italic; color: var(--muted); }
.paras code { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .8em; background: var(--tint); padding: .1em .3em; }
.paras pre { background: var(--tint); border: 1px solid var(--line); padding: 14px 16px; overflow-x: auto; line-height: 1.45; }
.paras pre code { background: none; padding: 0; }
.paras img { border: 1px solid var(--ink); }
.paras figure { display: grid; gap: 8px; }
.paras figcaption { font-style: italic; font-size: 15px; color: var(--muted); }
.paras .blog-figure { margin: .35em 0; }
.paras .blog-figure figcaption { font-style: normal; font-size: 14px; line-height: 1.45; }
.paras .blog-figure figcaption strong { color: var(--ink); }
.paras .blog-diagram { overflow-x: auto; }
.paras .blog-diagram img { width: 100%; min-width: 680px; max-width: none; height: auto; background: #fffdf6; }
.paras .blog-bot-profile img { width: min(100%, 420px); height: auto; background: #11151c; }
.paras .blog-shot-window { width: 100%; aspect-ratio: 1.3; position: relative; overflow: hidden; border: 1px solid var(--ink); background: #11151c; }
.paras .blog-shot-window img { position: absolute; width: 250%; max-width: none; height: auto; border: 0; transform: translate(-30%, -12%); }
.paras .blog-shot-window.shot-history img { transform: translate(-30%, -7%); }
.paras .blog-shot-window.shot-persona img { transform: translate(-30%, -11%); }
.paras .blog-shot-window.shot-schedule img { transform: translate(-30%, -11%); }
.paras .blog-shot-window.shot-flag img { transform: translate(-20%, -28%); }
.paras table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .88em; line-height: 1.45; }
.paras th, .paras td { padding: .7em .65em; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.paras th { background: var(--tint); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; }
.paras details summary { cursor: pointer; font-weight: 600; }
.paras hr { border: 0; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* — small screens — */
.paras { overflow-wrap: break-word; }
.paras > div, .paras figure, .paras ul, .paras ol { min-width: 0; }
.paras table { display: block; overflow-x: auto; }
.paras .blog-diagram { max-width: 100%; }

@media (max-width: 640px) {
  .page { padding: 0 16px; }
  .topbar { font-size: 11px !important; padding: 10px 0 !important; }
  .tabs { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 12px 14px !important; }
  .read-col { gap: 20px !important; }
  .read-tools { gap: 8px !important; }
  .read-tools .btn-secondary { padding: 9px 12px; font-size: 13px; }
  .read-tools > span { font-size: 13px !important; }
  .read-tools > span button { padding: 8px 10px !important; }
  .read-dek { font-size: 19px !important; line-height: 27px !important; }
  .paras h2 { font-size: 1.35em; }
  .paras pre { padding: 12px; font-size: 13px; }
  .paras .blog-shot-window { aspect-ratio: 1.1; }
  .row-link { gap: 4px 12px !important; }
  .row-link > span:first-child { flex-basis: 100% !important; }
  .row-link .arrow-box { display: none; }
}
