/* senyurd.com — Classic style */
:root {
  --bg: #fbfaf6; --surface: #ffffff; --ink: #1d1f1c; --ink2: #55584f; --rule: #e6e2d8;
  --accent: #1f5c4a; --accent-soft: #e7efe9; --btn: #1f5c4a; --btn-ink: #ffffff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a; --surface: #1c1f22; --ink: #ece9e1; --ink2: #aaa79d; --rule: #2d302f;
    --accent: #7cc4a9; --accent-soft: #1f2a26; --btn: #7cc4a9; --btn-ink: #10241d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a; --surface: #1c1f22; --ink: #ece9e1; --ink2: #aaa79d; --rule: #2d302f;
  --accent: #7cc4a9; --accent-soft: #1f2a26; --btn: #7cc4a9; --btn-ink: #10241d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16.5px/1.65 var(--sans);
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.005em; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; }
.preview-banner { background: #b5651d; color: #fff; text-align: center; font-size: 13px; padding: 4px; letter-spacing: .04em; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--rule); background: var(--bg); }
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-name { font-family: var(--serif); font-size: 22px; color: var(--ink); text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--ink2); text-decoration: none; font-size: 15px; padding: 4px 0; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.menu-btn { display: none; font: 500 14px var(--sans); color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 6px 12px; cursor: pointer; }

.main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 48px 24px 72px; }
.footer { border-top: 1px solid var(--rule); max-width: var(--max); width: calc(100% - 48px); margin: 0 auto; padding: 20px 0 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink2); font-size: 14px; }
.footer a { color: var(--ink2); }

/* Shared bits */
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink2); font-weight: 600; margin: 0 0 .4em; }
.meta { color: var(--ink2); font-size: 15px; margin: 0 0 .35em; }
.btn { display: inline-block; background: var(--btn); color: var(--btn-ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 18px; border-radius: 4px; }
.btn:hover { filter: brightness(1.08); }
.list { margin: 0; padding-left: 1.2em; list-style: none; }
.list li { position: relative; margin: 0 0 .55em; }
.list li::before { content: ""; position: absolute; left: -1.05em; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.list b { font-weight: 600; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin-bottom: .3em; }
.prose p:last-child { margin-bottom: 0; }
details summary { cursor: pointer; color: var(--accent); font-weight: 500; }
details[open] summary { margin-bottom: .6em; }

/* Page */
.page { max-width: 780px; }
.page-title { font-size: clamp(32px, 5vw, 42px); margin-bottom: .8em; }
.section-h { font-size: 24px; margin: 1.8em 0 .7em; padding-bottom: .3em; border-bottom: 1px solid var(--rule); }
.lead { font-size: 18px; color: var(--ink2); margin-bottom: 1.6em; }
.lead-sm { color: var(--ink2); margin-bottom: 1.4em; }

/* Home */
.home-grid { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.portrait { width: 100%; max-width: 260px; border-radius: 4px; margin-bottom: 18px; }
.profile-name { font-size: 28px; margin-bottom: .2em; }
.profile-role, .profile-aff { margin: 0; color: var(--ink2); font-size: 15px; }
.icons { list-style: none; display: flex; gap: 10px; padding: 0; margin: 14px 0 18px; }
.icons a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: 50%; color: var(--ink2); background: var(--surface); }
.icons a:hover { color: var(--accent); border-color: var(--accent); }
.icons svg { width: 18px; height: 18px; fill: currentColor; }
.home-content { max-width: 680px; }
.home-content .prose { font-size: 17.5px; }
.jmp { margin: 32px 0 8px; padding: 6px 0 6px 20px; border-left: 3px solid var(--accent); }
.jmp-title { font-style: italic; font-size: 24px; margin-bottom: .3em; }
.jmp-title a { color: var(--ink); }
.jmp-abstract { font-size: 16px; color: var(--ink2); margin: .4em 0 .8em; line-height: 1.6; }
.jmp-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0; font-size: 15px; }
.jmp-actions .meta { margin: 0; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.block { margin-top: 36px; }
.block > h2, .block > summary { font-size: 24px; }
.block > h2 { padding-bottom: .3em; border-bottom: 1px solid var(--rule); margin-bottom: .8em; }
details.block > summary { font-family: var(--serif); font-size: 20px; font-weight: 500; }

/* Research */
.paper-jmp { background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 4px; padding: 20px 24px; }
.paper-title { font-style: italic; font-size: 26px; }
.paper-title a, .paper-title-sm a { color: var(--ink); }
.papers { list-style: none; margin: 0; padding: 0; }
.papers .paper { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.papers .paper:last-child { border-bottom: 0; }
.paper-title-sm { font-size: 20px; margin-bottom: .25em; }
.abstract { font-size: 15.5px; color: var(--ink2); margin: .4em 0 .6em; }
.links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; margin: .5em 0 0; }
.links span { color: var(--ink2); font-style: italic; }

/* Projects */
.projects { list-style: none; margin: 0; padding: 0; }
.project { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.project:first-child { padding-top: 0; }
.project-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.when { color: var(--ink2); font-size: 14px; white-space: nowrap; }

/* CV */
.cv-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cv-actions .meta { margin: 0; }
.cv-rows { display: grid; grid-template-columns: 130px 1fr; gap: 10px 24px; margin: 0; }
.cv-rows dt { color: var(--ink2); font-size: 15px; font-variant-numeric: tabular-nums; }
.cv-rows dd { margin: 0; }
.cv-rows dd span { display: block; color: var(--ink2); font-size: 15px; }
.refs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.refs li { display: flex; flex-direction: column; font-size: 15px; }
.refs span { color: var(--ink2); }

/* Contact */
.contact-grid { display: grid; gap: 28px; }
.contact-email { font-family: var(--serif); font-size: 24px; }
address { font-style: normal; }

/* Experiments */
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.game-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); text-decoration: none; height: 100%; transition: border-color .15s, transform .15s; }
.game-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.game-emoji { font-size: 34px; line-height: 1; }
.game-text { flex: 1; display: flex; flex-direction: column; }
.game-text strong { font-family: var(--serif); font-weight: 500; font-size: 20px; }
.game-text span { color: var(--ink2); font-size: 14.5px; line-height: 1.45; }
.game-play { color: var(--accent); font-weight: 600; font-size: 14px; }
.crumb { font-size: 14px; margin-bottom: 1em; }
.crumb a { text-decoration: none; }
.game-stage { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 20px; overflow: hidden; -webkit-user-select: none; user-select: none; }
.game-stage, .game-stage * { max-width: 100%; }
.game-stage canvas { height: auto; }
.game-stage button { background: var(--btn) !important; color: var(--btn-ink) !important; border: 0 !important; border-radius: 4px !important; font-family: var(--sans) !important; }
.game-stage h1, .game-stage h2, .game-stage h3 { font-family: var(--serif); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .game-stage .game-root { color: #1d1f1c; background: #f6f4ee; border-radius: 4px; padding: 12px; }
}

/* Mobile */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar-inner { padding: 14px 16px; }
  .menu-btn { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 0; padding-top: 8px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-top: 1px solid var(--rule); font-size: 16px; }
  .nav a.active { text-underline-offset: 5px; }
  .main { padding: 28px 16px 56px; }
  .footer { width: calc(100% - 32px); }
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .profile { display: grid; grid-template-columns: 112px 1fr; column-gap: 18px; align-items: start; }
  .portrait { grid-row: span 5; margin: 0; }
  .profile-name { font-size: 24px; }
  .icons { margin: 10px 0 12px; }
  .profile .btn { justify-self: start; padding: 8px 14px; font-size: 14px; }
  .cv-rows { grid-template-columns: 1fr; gap: 2px; }
  .cv-rows dd { margin-bottom: 12px; }
  .games { grid-template-columns: 1fr; }
  .game-stage { padding: 10px; }
}
