/* Lo-fi site — Felix-style static pages */
@font-face { font-family: "Departure Mono"; src: url("fonts/DepartureMono-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Unbounded"; font-weight: 800; src: url("fonts/unbounded-latin-800-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Source Serif 4"; font-weight: 400; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Source Serif 4"; font-weight: 700; src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Caveat"; font-weight: 500; src: url("fonts/caveat-latin-500-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Fira Sans"; font-weight: 400; src: url("fonts/fira-sans-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Fira Sans"; font-weight: 700; src: url("fonts/fira-sans-latin-700-normal.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #13110e; --fg: #ece5d3; --text: #cfc7b6; --muted: #8e8678; --rule: #2e2a24; --chip: #ece5d3; --chip-ink: #13110e;
  --link: #ece5d3; --accent: #f0a75a; --code-bg: #1d1a16;
  --serif: "Source Serif 4", Georgia, serif; --mono: "Departure Mono", ui-monospace, Menlo, monospace;
  --sans: "Fira Sans", system-ui, sans-serif; --sans-text: "Fira Sans", system-ui;
}
:root[data-theme="light"] {
  --bg: #f4efe4; --fg: #1d1a15; --text: #3a352d; --muted: #7b7366; --rule: #ddd4c3; --chip: #1d1a15; --chip-ink: #f4efe4;
  --link: #1d1a15; --accent: #b4661c; --code-bg: #e9e2d3;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--link) 55%, transparent); }
a:hover { text-decoration-color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

/* header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 48px; }
.brand { font-family: "Unbounded", var(--sans); font-weight: 800; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg); text-decoration: none; white-space: nowrap; }
.head-right { display: flex; align-items: center; gap: 22px; }
.nav { display: flex; gap: 4px; }
.nav a, .foot-nav a { font-family: var(--mono); font-size: 17px; letter-spacing: .1em; color: var(--muted); text-decoration: none; padding: 7px 12px 5px; border-radius: 5px; }
.nav a:hover, .foot-nav a:hover { color: var(--fg); }
.nav a.active { background: var(--chip); color: var(--chip-ink); }
.btn { font-family: var(--mono); font-size: 15px; letter-spacing: .12em; color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 5px; padding: 8px 14px 6px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { color: var(--fg); border-color: var(--muted); }
.btn svg { width: 18px; height: 18px; }

/* page body */
main { max-width: 760px; margin: 0 auto; padding: 70px 24px 120px; }
.page-title { font-family: var(--serif); font-weight: 700; font-size: clamp(44px, 7vw, 76px); line-height: 1.06; color: var(--fg); margin: 0 0 46px; letter-spacing: -.01em; }
hr, .rule { border: 0; border-top: 1px solid var(--rule); margin: 0 0 48px; }
main p { margin: 0 0 26px; }
main h2 { font-family: var(--sans); font-weight: 700; font-size: 30px; color: var(--fg); margin: 64px 0 18px; line-height: 1.2; }
main h3 { font-family: var(--sans); font-weight: 700; font-size: 23px; color: var(--fg); margin: 40px 0 12px; }
main ul, main ol { padding-left: 24px; margin: 0 0 26px; } main li { margin: 0 0 8px; }
main img { max-width: 100%; border-radius: 6px; border: 1px solid var(--rule); }
main code { font-family: var(--mono); font-size: .8em; background: var(--code-bg); padding: 2px 6px; border-radius: 4px; }
main pre { background: var(--code-bg); padding: 18px 20px; border-radius: 8px; overflow-x: auto; line-height: 1.5; } main pre code { background: none; padding: 0; }
main blockquote { margin: 0 0 26px; padding-left: 20px; border-left: 2px solid var(--accent); font-style: italic; }
.label { font-family: var(--mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* home */
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(46px, 8vw, 84px); line-height: 1.04; color: var(--fg); margin: 0 0 22px; }
.hero .lead { font-size: 23px; }
.room-card { display: block; margin: 40px 0 70px; position: relative; text-decoration: none; }
.room-card img { width: 100%; display: block; border-radius: 10px; border: 1px solid var(--rule); }
.room-card span { position: absolute; left: 16px; bottom: 16px; font-family: var(--mono); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; background: var(--chip); color: var(--chip-ink); padding: 7px 12px 5px; border-radius: 5px; }
.sec { margin: 0 0 64px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 8px; }
.sec-head h2 { margin: 0; font-size: 26px; }
.sec-head a { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; color: var(--muted); text-decoration: none; text-transform: uppercase; }

/* lists (work / posts / online) — Felix style */
.rows { list-style: none; padding: 0 !important; margin: 0; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); margin: 0; align-items: baseline; }
.rows .t { color: var(--fg); font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; text-decoration: none; }
.rows a.t:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.rows .r { font-family: var(--mono); font-size: 16px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.rows .d { grid-column: 1 / -1; font-family: var(--sans-text, system-ui), sans-serif; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 640px; }
.rows .d a { color: var(--fg); }
.rows .role { display: block; font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.rows.online li { padding: 20px 0; }
.sec > h2 { margin-top: 0; }
.hero .more { font-family: var(--mono); font-size: 16px; letter-spacing: .06em; }
.hero + hr { margin: 50px 0; }

/* post page */
.post-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 48px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.post-bar::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: calc(var(--p, 0) * 100%); background: #8c9cff; transition: width .1s linear; }
:root[data-theme="light"] .post-bar::after { background: #3b55c9; }
.post-bar .left { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.post-bar a { color: #9db1ff; text-decoration: none; white-space: nowrap; }
:root[data-theme="light"] .post-bar a { color: #3b55c9; }
.post-bar .ptitle { font-family: var(--sans-text, system-ui), sans-serif; text-transform: none; letter-spacing: 0; color: var(--fg); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .25s; }
.post-bar.scrolled .ptitle { opacity: 1; }
.post-bar .part { color: var(--muted); background: none; border: 0; font: inherit; text-transform: uppercase; letter-spacing: inherit; cursor: pointer; white-space: nowrap; }
.part-menu { position: absolute; right: 40px; top: 100%; background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 0; min-width: 260px; display: none; text-transform: none; letter-spacing: .04em; }
.part-menu.open { display: block; }
.part-menu a { display: block; color: var(--muted) !important; padding: 7px 18px; white-space: normal; }
.part-menu a:hover, .part-menu a.on { color: var(--fg) !important; }
.post-wrap { display: grid; grid-template-columns: 260px minmax(0, 760px); gap: 70px; max-width: 1180px; margin: 0 auto; padding: 70px 48px 120px; }
.post-wrap main { padding: 0; margin: 0; max-width: none; }
.toc { position: sticky; top: 90px; align-self: start; font-family: var(--mono); font-size: 15px; letter-spacing: .06em; }
.toc .label { display: block; margin-bottom: 18px; }
.toc a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0; line-height: 1.35; }
.toc a.sub { padding-left: 20px; }
.toc a.on, .toc a:hover { color: var(--fg); }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 40px; }
.meta .v { font-family: var(--sans); color: var(--fg); font-size: 18px; margin-top: 6px; }
.meta .v::before { content: "└ "; color: var(--muted); font-family: var(--mono); }
.post-title { font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 5.5vw, 66px); line-height: 1.1; color: var(--fg); margin: 0 0 44px; }
.post-end { margin-top: 70px; padding-top: 30px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* subscribe: reply card */
.card { display: grid; grid-template-columns: 1fr 1fr; background: #f2eee4; color: #15130f; border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.35); margin: 40px 0 18px; transform: rotate(-.4deg); font-family: var(--sans); }
.card .l { padding: 36px 34px 30px; border-right: 1.5px solid #cfc6b3; background-image: radial-gradient(rgba(47,69,196,.22) 1px, transparent 1.2px); background-size: 7px 7px; background-position: 0 100%; background-repeat: repeat-x; background-origin: content-box; position: relative; }
.card .l::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, transparent 0, #f2eee4 46%); pointer-events: none; }
.card .l > * { position: relative; }
.card .kicker { font-family: var(--mono); color: #2f45c4; letter-spacing: .2em; font-size: 15px; }
.card h3 { font-family: var(--sans); font-weight: 700; font-size: 52px; line-height: .95; letter-spacing: -.02em; margin: 14px 0 24px; text-transform: uppercase; color: #15130f; }
.card .tick { display: flex; gap: 12px; align-items: flex-start; font-size: 18px; line-height: 1.35; margin: 0 0 12px; }
.card .tick b { flex: none; width: 26px; height: 26px; border: 2px solid #15130f; display: grid; place-items: center; color: #2f45c4; font-size: 22px; line-height: 1; }
.card .r { padding: 30px 34px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.stamp { position: absolute; top: 30px; right: 34px; width: 116px; height: 136px; background: #2f45c4; color: #fff; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 17px; line-height: 1.15; letter-spacing: .04em; outline: 3px dotted #f2eee4; outline-offset: -6px; }
.card label { font-family: var(--mono); font-size: 15px; letter-spacing: .12em; color: #444; margin: 70px 0 6px; }
.card input { font-family: "Caveat", cursive; font-size: 32px; border: 0; border-bottom: 2px solid #b8b0a0; background: transparent; padding: 4px 2px; color: #15130f; outline: none; width: 100%; }
.card input::placeholder { color: #a39c8d; }
.card button { align-self: flex-end; margin-top: 22px; background: #2f45c4; color: #fff; border: 0; font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: .06em; padding: 12px 26px; cursor: pointer; }
.card button:hover { background: #1f33a8; }
.card .sent { font-family: "Caveat", cursive; font-size: 30px; color: #2f45c4; margin-top: 18px; }
.fine { font-family: system-ui, sans-serif; font-size: 16px; color: var(--muted); }
@media (max-width: 760px) { .card { grid-template-columns: 1fr; } .card .l { border-right: 0; border-bottom: 1.5px solid #cfc6b3; } .card h3 { font-size: 40px; } .stamp { width: 90px; height: 104px; font-size: 14px; } }

/* footer */
.site-foot { border-top: 1px solid var(--rule); margin: 0 48px; padding: 30px 0 46px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.foot-nav a { padding-left: 0; padding-right: 22px; }

@media (max-width: 900px) {
  .post-wrap { grid-template-columns: 1fr; gap: 0; padding: 40px 24px 100px; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 18px; }
  .site-head { flex-direction: column; align-items: flex-start; padding: 20px 20px; }
  .head-right { flex-wrap: wrap; gap: 10px; }
  .nav a { font-size: 15px; padding: 6px 9px 4px; }
  .post-bar { padding: 12px 20px 16px; }
  .meta { grid-template-columns: 1fr 1fr; }
  .site-foot { margin: 0 20px; }
}
