:root {
  color-scheme: light;
  --paper: #faf8f2;
  --ink: #20221d;
  --muted: #4f554c;
  --tomato: #ab3020;
  --rule: #d9d7ca;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 1rem/1.5 var(--sans); }
h1,h2,p,figure,ul { margin: 0; }
button,a { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #145daf; outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - clamp(2.25rem, 8vw, 8.5rem))); margin-inline: auto; }
.mast { display: flex; align-items: center; justify-content: space-between; min-height: 72px; border-bottom: 1px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 850; font-size: 1.4rem; letter-spacing: -.085em; }
.brand img { object-fit: contain; }
.period { color: var(--tomato); }
.pdf-button,.read,.email,.back { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 44px; font-size: .91rem; font-weight: 660; text-decoration: none; }
.pdf-button { background: none; border: 0; padding: 0 0 0 12px; }
.pdf-button span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #aaa99c; border-radius: 50%; }
.pdf-button:hover span { background: var(--ink); color: white; }
.cover { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); align-items: center; gap: clamp(1.75rem,5.5vw,5.5rem); padding: clamp(1.7rem,4.6vw,4.4rem) 0 clamp(1.6rem,3.4vw,3.2rem); }
.identity { min-width: 0; }
.role { color: var(--tomato); font-weight: 710; font-size: clamp(.85rem,1.4vw,1.01rem); line-height: 1.35; margin-bottom: .72rem; }
h1,h2,.role,.summary,.entry,.foot { overflow-wrap: anywhere; }
h1 { font-size: clamp(3rem,6.9vw,6.55rem); line-height: .97; letter-spacing: -.074em; font-weight: 620; }
h1 em { margin-inline-start: .065em; font: italic 400 1.13em/.88 var(--serif); letter-spacing: -.038em; }
h1:focus,.entry h2:focus { outline: 0; }
.summary { margin-top: 1.25rem; color: var(--muted); max-width: 44ch; font-size: clamp(1rem,1.25vw,1.14rem); line-height: 1.5; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: 1.35rem; }
.read { padding: .6rem 1.05rem; border-radius: 6px; background: var(--ink); color: white; border: 1px solid var(--ink); }
.read:hover { background: #414c39; }
.email,.back { text-decoration: underline; text-underline-offset: .22em; text-decoration-color: #adac9e; }
.email:hover,.back:hover,.pdf-button:hover { color: var(--tomato); }
.pizza-menu figcaption { margin-top: .5rem; font-size: .79rem; color: var(--muted); text-align: center; }
.entries { width: min(100%, 1020px); margin: 0 auto 1.5rem; display: grid; gap: clamp(.9rem, 2.5vw, 1.8rem); }
.entry {
  --section-border: color-mix(in srgb, var(--flavor-ink) 33%, var(--paper));
  --section-surface: color-mix(in srgb, var(--flavor-paper) 40%, #fffdf7);
  position: relative; min-width: 0; border: 1px solid var(--section-border); border-radius: 12px;
  background: var(--section-surface); scroll-margin-top: .4rem;
}
.section-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .5rem;
  padding: .32rem clamp(.72rem, 2vw, 1.5rem); min-height: 56px;
  background: var(--flavor-paper); color: var(--flavor-ink); border-radius: 11px 11px 0 0;
  border-bottom: 1px solid var(--section-border); box-shadow: 0 2px 0 rgb(65 45 20 / .035);
}
.section-bar .category { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: clamp(1.25rem,2.3vw,1.7rem); line-height: 1.12; letter-spacing: -.045em; font-weight: 730; }
.category::before { content: ""; width: 25px; height: 25px; flex: none; background: var(--food) center/contain no-repeat; transform: rotate(40deg); }
.section-count { font-size: .83rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: .09rem .42rem; border-radius: 100px; background: #fff9; }
.featured-label { font-size: .75rem; font-weight: 600; }
.section-picker { display: inline-flex; position: relative; min-height: 44px; align-items: center; gap: .38rem; margin-left: auto; padding: .1rem .22rem .1rem .5rem; font-size: .83rem; font-weight: 620; }
.section-picker::after { content: ""; width: .4rem; height: .4rem; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-1.5px) rotate(45deg); }
.section-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 1rem; }
.section-picker:focus-within { outline: 3px solid #145daf; outline-offset: 1px; border-radius: 5px; }
.entry-copy { padding: clamp(.8rem,2.6vw,1.65rem); }
.entry-text,.facts { max-width: 75ch; }
@media (max-width: 420px) {
  .section-bar { min-height: 50px; gap: .35rem; }
  .section-bar .category { gap: .36rem; }
  .category::before { width: 20px; height: 20px; }
  .section-picker { font-size: .78rem; }
  .featured-label { font-size: .68rem; }
}
@media (max-width: 360px) {
  .section-bar { flex-wrap: wrap; column-gap: .3rem; }
  .featured-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .entry.is-featured .cv-item:first-child .item-title::after { content: " ★"; color: var(--flavor-ink); font-size: .55em; vertical-align: super; }
}
.item-title { font-size: clamp(1.5rem,3.3vw,2.65rem); line-height: 1.09; letter-spacing: -.055em; font-weight: 600; }
.entry.is-featured .cv-item:first-child .item-title { font-size: clamp(2.1rem,4.4vw,3.7rem); }
.entry-meta { margin-top: .45rem; font-weight: 650; font-size: .88rem; color: #515b4b; }
.entry-text { margin-top: .65rem; color: var(--ink); line-height: 1.58; }
.entry ul { margin-top: .8rem; padding-left: 1.12em; color: var(--muted); }
.facts li { padding-left: .14em; }
.facts li + li { margin-top: .27rem; }
.facts li::marker { color: #8b907f; font-size: .75em; }
.work-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .4rem; font-weight: 650; color: var(--tomato); text-underline-offset: .2em; }
.return-parts { display: block; min-height: 44px; margin-top: .45rem; padding: 0; border: 0; background: none; color: var(--tomato); font-size: .86rem; font-weight: 650; text-decoration: underline; text-underline-offset: .24em; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; font-size: .9rem; color: var(--muted); }
.back { background: none; border: 0; }
#notice:not(:empty),.message { margin: 1rem 0; }
@media (max-width: 735px) {
  .mast { min-height: 55px; }
  .brand { font-size: 1.23rem; }
  .brand img { width: 31px; height: 31px; }
  .cover { grid-template-columns: 1fr; gap: 1.05rem; padding: 1.35rem 0 1.2rem; }
  .role { margin-bottom: .36rem; }
  h1 { font-size: clamp(2.7rem,11.7vw,4rem); }
  .summary { margin-top: .65rem; font-size: 1rem; line-height: 1.43; }
  .actions { margin-top: .58rem; gap: .35rem 1rem; }
  .entry.is-featured .cv-item:first-child .item-title { font-size: clamp(1.85rem,7.6vw,2.85rem); }
  .pizza-menu { width: min(100%, 525px); justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::after,*::before { animation: none !important; transition: none !important; }
}

.identity-heading { display: flex; align-items: center; gap: clamp(.65rem, 1.5vw, 1.35rem); }
.identity-heading > div:last-child { min-width: 0; }
.identity-heading:has(.portrait-frame:not([hidden])) h1 { font-size: clamp(2.7rem,5.6vw,5.3rem); }
.portrait-frame { width: clamp(76px,8.2vw,112px); flex: none; }
.profile-links { display: inline-flex; flex-wrap: wrap; gap: .2rem; }
.network-link { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid #cecec0; background: #fffdf7; color: #324c3e; }
.network-link svg { width: 21px; height: 21px; }
.network-link:hover, .network-link:focus-visible { background: #e7eee0; color: #214b31; }
#demo-network { width: min(24rem, 92vw); padding: 1.4rem; color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
#demo-network::backdrop { background: #18251970; }
#demo-network h2 { margin: .4rem 0; font-size: 1.5rem; }
#demo-network .read { margin-top: 1rem; }
.close-dialog { float: right; min-width: 44px; min-height: 44px; margin: -.6rem -.6rem 0 0; font-size: 1.45rem; border: 0; background: transparent; }
.sample-label { font-size: .8rem; font-weight: 650; color: var(--tomato); }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: .6rem; }
.entry-meta > span { max-width: 100%; overflow-wrap: anywhere; }
.entry-meta .organization, .entry-meta .place { padding: .15rem .55rem; border-radius: 5px; background: var(--flavor-paper); color: var(--flavor-ink); }
.entry[data-section="education"] { --place-bg: #e2edf6; --place-ink: #304c69; }
.entry[data-section="experience"] { --place-bg: #fbe3d5; --place-ink: #733e2e; }
.entry-meta .place { background: var(--place-bg, #e8efe7); color: var(--place-ink, #395443); }
.place::before { content: ""; display: inline-block; width: .62em; height: .62em; margin-right: .5em; margin-bottom: .12em; border: 1.5px solid currentColor; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.period-label { font-weight: 500; }
.item-list { padding: 0; margin: 0; list-style: none; }
.cv-item { position: relative; }
.item-title { margin: 0; }
.entry-copy .item-list { min-width: 0; }
.entry[data-section="projects"] .item-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 292px),1fr)); gap: .85rem; }
.entry[data-section="projects"] .cv-item {
  min-width: 0; padding: clamp(1rem,2vw,1.45rem); background: #fffef9;
  border: 1px solid var(--section-border); border-radius: 3px 16px 3px 3px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--flavor-paper) 78%, #c0a483);
}
.entry[data-section="projects"] .cv-item::after {
  content: ""; position: absolute; top: -1px; right: -1px; width: 17px; height: 17px;
  background: linear-gradient(45deg, var(--flavor-paper) 45%, var(--section-border) 50%, var(--section-surface) 53%);
  border-radius: 0 0 0 3px; pointer-events: none;
}
.entry[data-section="projects"] .item-title { font-size: clamp(1.4rem,2.4vw,2rem); }
.entry[data-section="projects"].is-featured .cv-item:first-child .item-title { font-size: clamp(1.55rem,2.8vw,2.2rem); }
.entry[data-section="experience"] .cv-item { padding: 0 .45rem 1.3rem 1.65rem; }
.entry[data-section="experience"] .cv-item:last-child { padding-bottom: 0; }
.entry[data-section="experience"] .cv-item::before {
  content: ""; position: absolute; left: .31rem; top: .6rem; height: 100%;
  border-left: 2px dashed var(--section-border);
}
.entry[data-section="experience"] .cv-item:last-child::before { display: none; }
.entry[data-section="experience"] .cv-item::after {
  content: ""; position: absolute; left: 0; top: .29rem; width: .75rem; height: .75rem;
  border: 2px solid var(--flavor-ink); border-radius: 3px; background: var(--flavor-paper);
}
.work-period { margin-bottom: .28rem; color: var(--flavor-ink); font-size: .87rem; font-weight: 720; }
.entry[data-section="experience"] .item-title { font-size: clamp(1.4rem,2.75vw,2rem); }
.entry[data-section="skills"] .item-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap: .65rem; }
.entry[data-section="skills"] .cv-item {
  padding: 1rem; min-width: 0; border-radius: 10px; background: #fffef9; border: 1px solid var(--section-border);
}
.entry[data-section="skills"] .item-title { display: flex; align-items: baseline; gap: .48rem; }
.entry[data-section="skills"] .item-title::before {
  content: ""; width: .78rem; height: .55rem; flex: none;
  border: 1px solid var(--flavor-ink); border-radius: 80% 0; background: var(--flavor-paper);
  transform: rotate(-14deg);
}
.entry[data-section="skills"] .entry-text { margin-top: .45rem; }
.entry[data-section="education"] .entry-copy { background: var(--paper); border-radius: 0 0 12px 12px; }
@media (min-width: 760px) {
  .entry[data-section="experience"] .cv-item:has(.work-period) {
    display: grid; grid-template-columns: minmax(110px, .33fr) minmax(0,1fr); column-gap: 1.2rem;
  }
  .entry[data-section="experience"] .cv-item:has(.work-period) > * { grid-column: 2; }
  .entry[data-section="experience"] .cv-item:has(.work-period) .work-period { grid-column: 1; grid-row: 1 / 3; }
}
@media (max-width: 560px) {
  .entry[data-section="skills"] .item-list { grid-template-columns: minmax(0,1fr); }
  .entry[data-section="skills"] .cv-item { padding: .8rem .9rem; }
}
.entry[data-section="skills"] .item-title { font-size: clamp(1.35rem,2.5vw,1.8rem); }
.entry[data-section="education"] .cv-item { padding: 0 0 1.65rem 2.6rem; margin: 0; border: 0; }
.entry[data-section="education"] .cv-item:last-child { padding-bottom: 0; }
.entry[data-section="education"] .cv-item::before { content: ""; position: absolute; z-index: 1; top: .19rem; left: 5px; width: 16px; height: 17px; border: 1px solid #c78935; border-radius: 61% 44% 57% 43%; background: radial-gradient(circle at 34% 29%, #fff4bc 12%, #fbd56b 40%, #e5aa46 80%); }
.cheese-strand { position: absolute; left: -1px; top: .7rem; height: 100%; width: 30px; pointer-events: none; }
.study-period { font-size: .87rem; font-weight: 740; color: #80561d; margin-bottom: .18rem; }
.entry[data-section="education"] .item-title { font-size: clamp(1.45rem,3vw,2.25rem); }
@media (max-width:735px) {
  .portrait-frame { width: clamp(63px,16vw,86px); }
  .identity-heading:has(.portrait-frame:not([hidden])) h1 { font-size: clamp(2rem,8.3vw,3.75rem); }
  .actions { column-gap: .55rem; }
  .entry[data-section="education"] .cv-item { padding-left: 2.25rem; }
}
