:root {
  --bg: #f7f4ee;
  --surface: #fbf9f5;
  --ink: #1c1a17;
  --ink-2: #4a463f;
  --muted: #8a8378;
  --line: #e4ded3;
  --chip: #efe9de;
  --accent: #b4532a;
  --accent-soft: #f6e6dc;
  --ok: #2f7a4f;
  --ok-soft: #e1efe5;
  --warn: #b4532a;
  --serif: "Newsreader", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --rail: 760px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151412; --surface: #1b1a17; --ink: #ede8df; --ink-2: #c2bcb1; --muted: #8a8378;
    --line: #2c2a26; --chip: #24221e; --accent: #e08a5f; --accent-soft: #3a261c;
    --ok: #6cc08e; --ok-soft: #1c2e23; --warn: #e08a5f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151412; --surface: #1b1a17; --ink: #ede8df; --ink-2: #c2bcb1; --muted: #8a8378;
  --line: #2c2a26; --chip: #24221e; --accent: #e08a5f; --accent-soft: #3a261c;
  --ok: #6cc08e; --ok-soft: #1c2e23; --warn: #e08a5f; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(var(--line), var(--line)), linear-gradient(var(--line), var(--line));
  background-size: 1px 100%, 1px 100%;
  background-position: calc(50% - var(--rail) / 2) 0, calc(50% + var(--rail) / 2) 0;
  background-repeat: no-repeat;
}
a { color: inherit; }
code { font: 0.85em var(--mono); background: var(--chip); padding: 1px 5px; border-radius: 4px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.rail { max-width: var(--rail); margin: 0 auto; }
.block { padding: 56px 24px; border-bottom: 1px solid var(--line); position: relative; }
.block.flush { padding: 0; }
.pad { padding: 56px 24px 24px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 500; margin: 0; }
h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: 28px; margin-bottom: 28px; }
h3 { font-size: 22px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
.mark { width: 30px; height: 30px; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 500 13px var(--serif); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }

.dots { height: 96px; border-bottom: 1px solid var(--line); background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px); background-size: 18px 18px; background-position: 6px 6px; }
.hatch { height: 22px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--line) 6px 7px); }

/* hero */
.hero { display: flex; gap: 28px; align-items: flex-start; border-bottom: none; padding-bottom: 40px; }
.avatar { flex: none; width: 108px; height: 108px; border-radius: 14px; border: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  background: repeating-conic-gradient(var(--chip) 0 25%, var(--surface) 0 50%) 0 0 / 18px 18px; }
.avatar span { display: grid; place-items: center; font: 500 46px var(--serif); color: var(--ink); }
.avatar span:last-child { background: var(--ink); color: var(--bg); }
.tagline { font-size: 14px; color: var(--ink-2); margin: 10px 0 4px; }
.meta { font-size: 13px; color: var(--muted); margin: 0 0 18px; display: flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .6; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; color: var(--ink); background: var(--surface); transition: border-color .15s, transform .15s; }
.pill:hover { border-color: var(--muted); transform: translateY(-1px); }
.pill-status { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.pill-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* rundown */
.rundown { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rundown div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 18px; }
.rundown div + div { border-top: 1px solid var(--line); }
.rundown dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); padding-top: 3px; }
.rundown dd { margin: 0; }
.rundown a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* experience */
.job-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.job-head .muted { font-size: 13px; }
.role { margin: 2px 0 10px; color: var(--ink-2); }
.job-sum { margin: 0 0 18px; max-width: 62ch; }
.prs { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line); }
.prs li { border-bottom: 1px solid var(--line); }
.prs a { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: baseline; padding: 12px 4px; text-decoration: none; font-size: 15px; transition: background .15s; }
.prs a:hover { background: var(--surface); }
.prs a:hover .pr-num { color: var(--accent); }
.pr-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.pr-num { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 12px var(--mono); padding: 4px 10px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); }

/* projects */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink-2); font-size: 14.5px; }
.notice svg { flex: none; color: var(--accent); margin-top: 3px; }
.notice p { margin: 0; }
.notice strong { color: var(--ink); font-weight: 500; }
.notice a { color: var(--accent); font-weight: 500; text-underline-offset: 3px; }
.project { display: grid; grid-template-columns: 1fr 280px; gap: 28px; padding: 32px 24px; border-top: 1px solid var(--line); }
.kicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.project h3 { font: 500 17px var(--mono); display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lnk { font: 13px var(--mono); color: var(--muted); text-underline-offset: 3px; }
.lnk:hover { color: var(--accent); }
.p-text > p:not(.kicker) { margin: 10px 0 0; font-size: 15px; }
.p-text strong { color: var(--ink); font-weight: 500; }
.p-text > p.stack { font-size: 12.5px; color: var(--muted); }
.p-text > p.status { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status a { color: var(--ink-2); text-underline-offset: 3px; }
.sleep-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); }
.window { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; align-self: start; box-shadow: 0 1px 0 var(--line), 0 12px 30px -18px rgb(0 0 0 / .25); }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--chip); }
.win-bar i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--muted); opacity: .6; }
.win-bar span { margin-left: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-body { padding: 14px 16px; font-size: 12.5px; color: var(--ink); }
.win-body p { margin: 0 0 4px; }
.win-body .lbl { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); margin-top: 10px; }
.win-body .lbl:first-child { margin-top: 0; }
.win-body hr { border: 0; border-top: 1px dashed var(--line); margin: 12px 0 0; }
.big { font-size: 20px; color: var(--accent); }
.ok { color: var(--ok); } .warn { color: var(--warn); }
.diagram .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.diagram .center { justify-content: center; }
.diagram .tag { flex: 1; font-size: 11px; color: var(--muted); }
.diagram .box { border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; background: var(--bg); }
.diagram .db { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.diagram .arrow { color: var(--muted); }
.more { padding: 18px 24px 24px; border-top: 1px solid var(--line); font-size: 14px; }
.more a { color: var(--ink-2); text-decoration: none; }
.more a:hover { color: var(--accent); }

/* reading */
.reading { display: flex; gap: 40px; align-items: flex-end; margin-bottom: 40px; }
.shelf { display: flex; align-items: flex-end; gap: 4px; padding-bottom: 8px; border-bottom: 3px solid var(--line); flex: none; }
.spine { width: 30px; border-radius: 3px 3px 1px 1px; box-shadow: inset -3px 0 0 rgb(0 0 0 / .08); display: flex; align-items: center; justify-content: center; }
.spine span { writing-mode: vertical-rl; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgb(0 0 0 / .45); }
.s1 { height: 132px; background: #c98f6b; }
.s2 { height: 146px; background: #9fb3a0; width: 26px; }
.s3 { height: 140px; background: #d8c7a6; width: 34px; }
.cover { position: relative; width: 112px; height: 168px; border-radius: 3px 6px 6px 3px; overflow: hidden; transform: rotate(-3deg) translateY(-6px); margin: 0 10px;
  box-shadow: inset 4px 0 0 rgb(0 0 0 / .18), 0 18px 30px -10px rgb(0 0 0 / .45); background: #1d2c4a; transition: transform .3s; }
.cover:hover { transform: rotate(0) translateY(-12px); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transform: scale(1.08); }
.cover-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 10px; color: #f3e9d2; text-align: center; font-family: var(--serif); }
.cover-fallback b { font-size: 17px; line-height: 1.05; letter-spacing: .04em; font-weight: 500; }
.cover-fallback small { font: 8px var(--mono); letter-spacing: .12em; }
.reading-text h3 { font-size: 26px; }
.reading-text .muted { margin: 2px 0 10px; }
.reading-text p:last-child { margin: 0; max-width: 42ch; font-size: 15px; }

.hobbies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hobby { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface); transition: border-color .15s, transform .15s; }
.hobby:hover { border-color: var(--muted); transform: translateY(-2px); }
.hobby svg { color: var(--accent); }
.hobby h4 { font-size: 19px; margin: 8px 0 4px; }
.hobby p { margin: 0; font-size: 14px; line-height: 1.6; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 28px 24px 48px; font-size: 12px; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 800px) {
  body { background-image: none; }
  .project { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .block { padding: 44px 16px; }
  .pad { padding: 44px 16px 20px; }
  .project { padding: 28px 16px; }
  .nav-links a { display: none; }
  .hero { flex-direction: column; gap: 20px; }
  .avatar { width: 84px; height: 84px; }
  .avatar span { font-size: 36px; }
  h1 { font-size: 34px; }
  .rundown div { grid-template-columns: 1fr; gap: 2px; }
  .prs a { grid-template-columns: 1fr auto; }
  .pr-tag { grid-column: 1 / -1; }
  .reading { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hobbies { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
