/* nikitashulga.com — refined edition of the original design */
@font-face { font-family: "Josefin Sans"; src: url("/assets/josefin-sans.ab5c169aeb65caf9.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/open-sans.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/open-sans-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/open-sans-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --background: #fafaf7;
  --paper: #ffffff;
  --ink: #202622;
  --body: #414943;
  --muted: #626a64;
  --link: #33534a;
  --accent: #4f7a6c;
  --rule: #d4d9d2;
  --rule-strong: #c6cdc5;
  --soft: #edf0e9;
  --sage: #e3e9df;
  --sans: "Open Sans", Arial, sans-serif;
  --display: "Josefin Sans", "Open Sans", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max: 1240px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #dce5d8; color: var(--ink); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2 { font-weight: 600; font-synthesis: none; }
p { color: var(--body); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .24em; transition: color .25s; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--link); outline-offset: 5px; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.wrap { width: min(var(--max), calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 20; padding: 10px 16px; background: var(--ink); color: var(--background); }
.skip-link:focus { top: 12px; }
.math { font-style: italic; white-space: nowrap; }
.math sub { font-style: normal; font-size: .7em; line-height: 0; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; font-size: .62em; line-height: 1; text-align: center; font-style: normal; margin: 0 1px; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 2px 1px; }

/* animated underline used by small links */
.ul { text-decoration: none; background: linear-gradient(currentColor, currentColor) left calc(100% - 1px) / 0 1px no-repeat; transition: background-size .45s var(--ease), color .25s; }
.ul:hover, .ul.on { background-size: 100% 1px; }

/* ---------------- header ---------------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--background) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 1px 0 var(--rule); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 25px; min-height: 84px; }
.wordmark { font: 600 17px/1 var(--display); letter-spacing: .01em; color: var(--ink); text-decoration: none; padding-top: 4px; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s var(--ease); pointer-events: none; }
.site-header.scrolled .wordmark, .not-home .wordmark { opacity: 1; transform: none; pointer-events: auto; }
#primary-nav { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 32px; font-size: 13px; letter-spacing: .02em; }
#primary-nav a { color: var(--ink); padding: 4px 0; }
#primary-nav a[aria-current] { color: var(--link); }

/* ---------------- home: masthead + intro ---------------- */
.home-masthead { padding: 34px 0 40px; }
.home-masthead h1 { font: 700 clamp(54px, 7.4vw, 104px)/1.04 var(--display); letter-spacing: -.035em; color: var(--ink); }
.masthead-rule { height: 1px; background: var(--ink); margin-top: 36px; transform-origin: left; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); grid-template-rows: auto 1fr; column-gap: clamp(60px, 9vw, 140px); row-gap: 48px; padding: 44px 0 80px; align-items: start; }
.intro-copy { grid-column: 1; grid-row: 1; max-width: 520px; }
.intro-eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 600 12px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--link); margin-bottom: 20px; }
.intro-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.position { font: 400 19px/1.5 var(--sans); color: var(--ink); }
.affiliation { font-size: 14.5px; line-height: 1.75; margin-top: 8px; }
.affiliation a { color: var(--body); }
.research-summary { font: 400 18px/1.7 var(--sans); margin-top: 28px; max-width: 480px; color: var(--ink); }
.intro-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin-top: 30px; font-size: 14px; }
.email-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--link); color: var(--link); text-decoration: none; font-weight: 600; font-size: 14px; position: relative; overflow: hidden; isolation: isolate; transition: color .35s; }
.email-btn::before { content: ""; position: absolute; inset: 0; background: var(--link); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); z-index: -1; }
.email-btn:hover { color: var(--background); }
.email-btn:hover::before { transform: none; }
.email-btn svg { width: 15px; height: 15px; }
.ext::after { content: " ↗"; font-size: .85em; opacity: .55; }

.portrait-plate { grid-column: 2; grid-row: 1 / span 2; justify-self: end; width: 100%; max-width: 410px; position: relative; }
.portrait-plate::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; background: var(--sage); z-index: -1; }
.portrait-frame { position: relative; overflow: hidden; background: var(--soft); aspect-ratio: 1152 / 1681; }
.portrait { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.portrait-plate:hover .portrait { transform: scale(1.025); }
.portrait-frame.noimg .portrait { visibility: hidden; }
.portrait-frame.noimg::after { content: "Portrait"; position: absolute; inset: 0; display: grid; place-items: center; font: 600 14px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.intro-recent { grid-column: 1; grid-row: 2; max-width: 520px; }
.recent-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 18px; margin-bottom: 14px; }
.recent-heading h2 { font: 600 21px/1.4 var(--display); letter-spacing: -.01em; }
.recent-heading a { font-size: 13px; }
.recent-paper { position: relative; padding: 18px 0 22px; border-top: 1px solid var(--rule); }
.recent-paper h3 { font: 600 18.5px/1.5 var(--sans); letter-spacing: -.015em; }
.recent-paper h3 a { color: var(--ink); text-decoration: none; }
.recent-paper p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.recent-paper .tag { display: inline-block; font: 600 10.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--link); margin-right: 10px; }

/* ---------------- research nav band ---------------- */
.research-nav { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-block: 1px solid var(--ink); padding: 18px 0; font-size: 14px; }
.research-nav div { display: flex; flex-wrap: wrap; gap: 8px 36px; }
.research-nav a { color: var(--link); }
.research-nav span { margin-left: 10px; color: var(--muted); font: 11px var(--mono); }

/* ---------------- bibliography ---------------- */
.bibliography { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 64px; padding: 72px 0 32px; }
.section-heading { grid-column: 1; grid-row: 1 / span 20; align-self: start; position: sticky; top: 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 22px; }
.section-heading h2 { font: 600 30px/1.2 var(--display); letter-spacing: -.015em; max-width: 220px; }
.count { display: inline-block; margin-left: 8px; vertical-align: middle; font: 400 11px/1.3 var(--mono); color: var(--muted); }
.section-note, .section-link { font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 190px; }
.section-link { color: var(--link); }
.bibliography > *:not(.section-heading) { grid-column: 2; }
.publication-list { list-style: none; margin: 0; padding: 0; }
.publication { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) 96px; column-gap: 24px; padding: 28px 0 30px; border-top: 1px solid var(--rule); isolation: isolate; }
.publication::before { content: attr(data-n); font: 11px/1.7 var(--mono); padding-top: 6px; color: var(--muted); transition: color .3s; }
.publication .hl { position: absolute; inset: 0 -20px; background: var(--paper); box-shadow: 0 0 0 1px var(--soft), 0 12px 30px -22px rgba(32, 38, 34, .35); opacity: 0; transition: opacity .35s; z-index: -1; pointer-events: none; }
.paper-title { font: 600 21px/1.5 var(--sans); letter-spacing: -.018em; transition: transform .45s var(--ease); }
.paper-title a { color: var(--ink); text-decoration: none; }
.paper-title a:hover { color: var(--link); }
.paper-authors { font-size: 14px; line-height: 1.7; margin-top: 9px; color: var(--muted); }
.paper-venue { font-size: 15px; line-height: 1.7; margin-top: 6px; color: var(--body); }
.journal-name { font-weight: 700; color: var(--ink); }
.paper-links { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.paper-links a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 88px; padding: 6px 10px; border: 1px solid var(--rule-strong); font: 600 13.5px/1.5 var(--sans); text-decoration: none; white-space: nowrap; overflow: hidden; isolation: isolate; transition: border-color .3s, color .3s; }
.paper-links a::before { content: ""; position: absolute; inset: 0; background: var(--soft); transform: scaleY(0); transform-origin: bottom; transition: transform .35s var(--ease); z-index: -1; }
.paper-links a:hover { border-color: var(--link); color: var(--link); }
.paper-links a:hover::before { transform: none; }
@media (hover: hover) {
  .publication:hover .hl { opacity: 1; }
  .publication:hover .paper-title, .recent-paper:hover h3 { transform: translateX(4px); }
  .publication:hover::before { color: var(--link); }
  .recent-paper h3 { transition: transform .45s var(--ease); }
}
.year-group { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 24px; margin-bottom: 30px; }
.year-heading { position: relative; font: 600 15px/1.7 var(--display); letter-spacing: .02em; color: var(--ink); padding-top: 30px; border-top: 1px solid var(--rule); }
.archive-link { padding-top: 16px; font-size: 14px; }
.publication-note { margin-top: 18px; font-size: 12px; color: var(--muted); }

/* ---------------- lectures teaser ---------------- */
.lectures { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 64px; padding: 64px 0 24px; border-top: 1px solid var(--rule); }
.lectures h2 { font: 600 30px/1.2 var(--display); letter-spacing: -.015em; }
.course { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 40px; padding: 32px 34px; background: var(--paper); border: 1px solid var(--soft); box-shadow: 0 18px 40px -32px rgba(32, 38, 34, .4); }
.course .meta { font: 600 11.5px/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--link); margin-bottom: 10px; }
.course h3 { font: 600 24px/1.3 var(--display); letter-spacing: -.01em; margin-bottom: 12px; }
.course p { font-size: 15px; }
.course ul { list-style: none; margin: 0; padding: 0; align-self: center; }
.course li a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; font-weight: 600; color: var(--ink); text-decoration: none; transition: color .25s, padding .35s var(--ease); }
.course li:first-child a { border-top: 1px solid var(--rule); }
.course li a span { font-weight: 400; font-size: 12px; color: var(--muted); }
.course li a:hover { color: var(--link); padding-left: 6px; }

/* ---------------- inner pages ---------------- */
.page-heading { padding: 40px 0 44px; }
.page-heading > * { max-width: 980px; }
.page-heading .intro-eyebrow { margin-bottom: 18px; }
.page-heading h1 { font: 700 clamp(46px, 6vw, 80px)/1.06 var(--display); letter-spacing: -.03em; }
.page-heading > p:not(.intro-eyebrow) { margin-top: 24px; font: 400 19px/1.65 var(--sans); max-width: 660px; }
.about-section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding: 40px 0 44px; border-top: 1px solid var(--rule); }
.about-section h2 { font: 600 26px/1.3 var(--display); letter-spacing: -.015em; }
.prose { font-size: 16.5px; max-width: 680px; }
.prose p + p { margin-top: 18px; }
.prose strong { color: var(--ink); }
.inline-links { display: flex; flex-wrap: wrap; gap: 12px 26px; font-size: 14px; margin-top: 20px; }
.rows { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.rows li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-top: 1px solid var(--rule); }
.rows li:first-child { border-top: 0; padding-top: 4px; }
.rows .when { font: 12px/2 var(--mono); color: var(--muted); }
.rows h3 { font: 600 16px/1.5 var(--sans); }
.rows p { font-size: 15px; margin-top: 3px; }
.contact-address { font: 600 clamp(22px, 3vw, 30px)/1.3 var(--display); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.short-page { min-height: 58vh; }

/* hobbies + gallery */
.hobby-photo { position: relative; max-width: 560px; }
.hobby-photo img { width: 100%; aspect-ratio: 3/2; object-fit: cover; background: var(--soft); }
.hobby-photo figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; font-style: italic; }
.gallery { columns: 3 300px; column-gap: 20px; padding: 8px 0 40px; }
.shot { break-inside: avoid; margin: 0 0 26px; }
.shot button { all: unset; display: block; width: 100%; cursor: zoom-in; overflow: hidden; background: var(--soft); }
.shot button:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
.shot img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.shot button:hover img { transform: scale(1.04); }
.shot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.shot figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.lightbox { border: 0; padding: 0; max-width: min(1400px, 94vw); max-height: 94vh; background: transparent; color: #fff; }
.lightbox[open] { animation: lb .4s var(--ease); }
@keyframes lb { from { opacity: 0; transform: scale(.97); } }
.lightbox::backdrop { background: rgba(26, 31, 28, .92); }
.lightbox img { max-width: 100%; max-height: 82vh; margin: 0 auto; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 2px 0; font-size: 14px; color: #dfe4dc; }
.lb-nav { display: flex; gap: 8px; }
.lightbox button, .lb-orig { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); font: 600 13px var(--sans); cursor: pointer; text-decoration: none; }
.lightbox button:hover, .lb-orig:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------------- footer ---------------- */
.site-footer { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 35px; margin-top: 90px; padding-block: 28px 44px; border-top: 1px solid var(--ink); font-size: 12px; }
.site-footer p { color: var(--ink); }
.footer-affiliation { display: block; color: var(--muted); margin-top: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer-links a { color: var(--ink); }

/* ---------------- motion ---------------- */
.motion .rise { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.motion .rise.in { opacity: 1; transform: none; }
.motion .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.motion .split .w > span { display: inline-block; transform: translateY(108%); transition: transform 1.15s var(--ease); transition-delay: var(--d, 0ms); }
.motion .split.in .w > span { transform: none; }
.motion .masthead-rule, .motion .draw::after { transform: scaleX(0); transition: transform 1.3s var(--ease) .35s; }
.motion .masthead-rule.in { transform: none; }
.motion .portrait-frame { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease) .3s; }
.motion .portrait-frame .portrait { transform: scale(1.1); transition: transform 2s var(--ease) .3s; }
.motion .portrait-plate::before { opacity: 0; transform: translate(-10px, -10px); transition: opacity 1s var(--ease) 1s, transform 1.2s var(--ease) 1s; }
.motion .portrait-plate.in .portrait-frame { clip-path: inset(0); }
.motion .portrait-plate.in .portrait { transform: none; }
.motion .portrait-plate.in::before { opacity: 1; transform: none; }
.motion .portrait-plate.in:hover .portrait { transform: scale(1.025); transition-delay: 0s; }
/* papers: rule draws in, then content rises */
.motion .publication, .motion .recent-paper, .motion .year-heading { border-top-color: transparent; }
.motion .publication::after, .motion .recent-paper::after, .motion .year-heading::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--rule); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.motion .publication.in::after, .motion .recent-paper.in::after, .motion .year-heading.in::after { transform: none; }
.motion .publication > :not(.hl), .motion .recent-paper > * { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0ms) + 120ms); }
.motion .publication::before { opacity: 0; transition: opacity .8s var(--ease) calc(var(--d, 0ms) + 60ms), color .3s; }
.motion .publication.in > :not(.hl), .motion .recent-paper.in > * { opacity: 1; transform: none; }
.motion .publication.in::before { opacity: 1; }
.motion .publication.in > .paper-main > .paper-title { transition: transform .45s var(--ease); }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 80px); }
  .intro { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); column-gap: 60px; }
  .bibliography, .about-section, .lectures { grid-template-columns: 175px minmax(0, 1fr); gap: 0 40px; }
  .year-group { grid-template-columns: 1fr; gap: 0; }
  .year-heading { border-top: 0; padding-top: 6px; }
  .motion .year-heading::after { display: none; }
  .paper-title { font-size: 20px; }
  .course { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 850px) {
  .wrap { width: calc(100% - 56px); }
  .site-header .wrap { min-height: 70px; }
  .wordmark { display: none; }
  #primary-nav { gap: 8px 22px; }
  .intro { grid-template-columns: minmax(0, 1fr) 280px; column-gap: 32px; }
  .bibliography, .about-section, .lectures { grid-template-columns: 1fr; }
  .section-heading { position: static; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 0 0 22px; grid-row: auto; }
  .section-heading h2 { font-size: 27px; max-width: none; }
  .section-note, .section-link { max-width: none; }
  .about-section { gap: 16px; }
  .lectures { gap: 20px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .site-header .wrap { justify-content: flex-start; }
  #primary-nav { font-size: 12.5px; gap: 6px 18px; }
  .home-masthead { padding: 16px 0 24px; }
  .home-masthead h1 { font-size: clamp(42px, 12.4vw, 72px); }
  .masthead-rule { margin-top: 24px; }
  .intro { grid-template-columns: 1fr; row-gap: 40px; padding-top: 30px; }
  .intro-copy, .portrait-plate, .intro-recent { grid-column: 1; grid-row: auto; }
  .portrait-plate { justify-self: start; max-width: 300px; }
  .publication { grid-template-columns: 24px minmax(0, 1fr); padding: 22px 0 24px; }
  .paper-links { grid-column: 2; flex-direction: row; flex-wrap: wrap; margin-top: 14px; gap: 10px; }
  .publication .hl { inset: 0 -10px; }
  .paper-title { font-size: 18.5px; }
  .research-nav { flex-direction: column; gap: 8px; }
  .rows li { grid-template-columns: 1fr; gap: 0; }
  .page-heading h1 { font-size: 42px; }
  .site-footer { grid-template-columns: 1fr; gap: 14px; }
  .course { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-header, .site-footer, .research-nav, .skip-link, .intro-recent, .lectures { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .motion * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
.intro-links { flex-direction: column; align-items: flex-start; gap: 18px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }

/* Preserve readable native-ratio photographs and reliable dismissal. */
html.photo-open { overflow: hidden; }
.lightbox img { cursor: zoom-out; }
.anchor-alias { display: block; scroll-margin-top: 110px; }
.bibliography, .about-section { scroll-margin-top: 110px; }
.hobby-photo img { aspect-ratio: auto; object-fit: contain; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Extracted reference declarations: compatible with strict style-src self. */
.design-s-3d2f17f8ef14{--d:250ms}
.design-s-a7145017acaf{--d:560ms}
.design-s-37e638ec6ff6{--d:300ms}
.design-s-01471c131abd{padding-bottom:40px}
.design-s-988c41ef0746{border-top:0;padding-top:8px}
.design-s-773d55b2b5cc{--d:100ms}
.design-s-a51c2baa9edf{margin:20px 0}
.design-s-6b3bd7ad9e29{--d:0ms}
.design-s-eb9d2f6e587b{--d:90ms}
.design-s-7c317f911414{--d:180ms}
