:root {
  --paper: #f7f6f2;
  --ink: #202522;
  --muted: #5f6862;
  --green: #355e4c;
  --line: #dcded5;
  --surface: #e9ede3;
  --node-surface: #f5f6f1;
  --node-border: #c3cebd;
  --node-ink: #4b5948;
  --accent-fill: #355e4c;
  --accent-ink: #ffffff;
  --accent-hover: #244737;
  --soft-hover: #e5e9de;
  --link-line: #b5bcb2;
  --selection: #dce5d9;
  --connector: #7a8b70;
  --calendar-surface: #eef1e9;
  --heat-0: #dce2d6;
  --heat-1: #8fbb7c;
  --heat-2: #5c974d;
  --heat-3: #37723c;
  --heat-4: #204d31;
  --heat-stroke: #2025221c;
  --serif: 'Newsreader', serif;
  --sans: 'DM Sans', sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #171c19;
  --ink: #e8eae4;
  --muted: #a5afa6;
  --green: #a8c6af;
  --line: #323c35;
  --surface: #202920;
  --node-surface: #29352c;
  --node-border: #485c4c;
  --node-ink: #c5d6c7;
  --accent-fill: #a8c6af;
  --accent-ink: #17241a;
  --accent-hover: #c0d9c5;
  --soft-hover: #29352c;
  --link-line: #637769;
  --selection: #3b5743;
  --connector: #8ea78e;
  --calendar-surface: #1e2721;
  --heat-0: #2d3931;
  --heat-1: #3d654b;
  --heat-2: #57825c;
  --heat-3: #78a277;
  --heat-4: #a8c6af;
  --heat-stroke: #f7f6f214;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.75 var(--sans); font-optical-sizing: auto; font-synthesis: none; }
a { color: inherit; text-decoration: none; }
a, button { font-weight: 500; }
button { font: inherit; font-weight: 500; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
::selection { background: var(--selection); }
h1, h2, h3, p, figure { margin: 0; }
.skip { position: absolute; left: 20px; top: -100px; background: var(--ink); color: var(--paper); padding: 10px 20px; z-index: 10; }
.skip:focus { top: 15px; }
.page { max-width: 1080px; padding: 0 48px; margin: auto; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 96px; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.theme-toggle { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; padding: 8px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); }
.theme-toggle:hover { color: var(--ink); background: var(--soft-hover); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-moon { color: var(--green); fill: currentColor; }
.theme-sun { display: none; }
.theme-sun circle { fill: currentColor; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }
.metadata { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; }
.wordmark { display: inline-flex; align-items: center; flex-shrink: 0; white-space: nowrap; color: var(--green); font-family: var(--sans); font-weight: 400; font-size: 21px; line-height: 1.2; letter-spacing: 0; }
.wordmark-name strong { font-weight: 700; }
nav { display: flex; gap: 30px; font-size: 14px; color: var(--muted); }
nav a:hover, footer a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 5px; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 66px; align-items: center; padding: 45px 0 52px; }
h1 { font-family: var(--serif); font-size: clamp(48px, 5.5vw, 64px); font-weight: 400; line-height: 1.08; letter-spacing: -.015em; }
.hero h1 { margin-inline-start: -14px; }
.specialty { margin-top: 16px; color: var(--green); font-size: 20px; line-height: 1.5; }
.intro { max-width: 400px; color: var(--muted); font-size: 15px; line-height: 1.85; margin-top: 20px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; }
.hero .profile-links { margin-top: 24px; }
.profile-links a { white-space: nowrap; text-decoration: none; text-underline-offset: 4px; text-decoration-color: var(--link-line); }
.profile-links a:hover { color: var(--green); text-decoration: underline; }
.portrait { width: 100%; max-width: 270px; aspect-ratio: 4/5; overflow: hidden; border-radius: 6px; justify-self: end; margin-inline-end: 32px; }
.portrait-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.section { border-top: 1px solid var(--line); padding: 26px 0 45px; }
h2 { font-family: var(--serif); font-weight: 500; font-size: 36px; letter-spacing: -.01em; line-height: 1.2; margin-bottom: 28px; }
.project-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.project-card + .project-card { margin-top: 26px; }
.project-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 310px; padding: 24px; background: var(--surface); border-left: 1px solid var(--line); }
.project-placeholder { gap: 16px; }
.project-placeholder img { display: block; width: 72px; height: 72px; }
.project-placeholder figcaption { font-size: 12px; color: var(--muted); }
.project-content { padding: 32px; align-self: center; }
.project h3 { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.22; letter-spacing: -.005em; }
.project p { font-size: 14px; color: var(--muted); margin-top: 15px; }
.project .project-meta { font-size: 13px; line-height: 1.7; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 24px; }
.text-link { padding: 0; border: 0; background: none; font-size: 13px; font-weight: 500; margin-top: 25px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.architecture .diagram-title { font-size: 11px; margin: 0 0 14px; }
.diagram-flow { display: flex; flex-direction: column; align-items: center; }
.node { border: 1px solid var(--node-border); border-radius: 3px; background: var(--node-surface); padding: 9px 13px; font-size: 11px; text-align: center; min-width: 110px; color: var(--node-ink); }
.node-small { min-width: 150px; }
.node-main { min-width: 160px; background: var(--accent-fill); color: var(--accent-ink); font-size: 13px; border-color: var(--accent-fill); }
.connector { font-size: 17px; color: var(--connector); line-height: 1.55; }
.node-branches { display: flex; gap: 12px; }
.github-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; margin-bottom: 20px; }
.github-profile { flex-shrink: 0; font-size: 13px; color: var(--muted); }
.github-profile:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.github-summary, .github-loading { color: var(--muted); font-size: 13px; }
.github-summary { margin: 0; font-size: 12px; }
.github-panel { padding: 22px 20px 18px; border: 1px solid var(--node-border); border-radius: 5px; background: var(--calendar-surface); }
.github-calendar { overflow-x: auto; padding-bottom: 8px; scrollbar-color: var(--node-border) transparent; }
.github-calendar:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.github-calendar svg { display: block; width: 100%; min-width: 660px; height: auto; }
.github-calendar text { fill: var(--muted); font: 11px var(--sans); }
.contribution-day { stroke: var(--heat-stroke); stroke-width: 1; cursor: pointer; }
.contribution-day:hover, .contribution-day:focus-visible, .contribution-day.is-active { stroke: var(--ink); stroke-width: 1.8; outline: none; }
.contribution-tooltip { position: fixed; z-index: 30; padding: 10px 14px; max-width: calc(100vw - 16px); border-radius: 5px; background: var(--ink); color: var(--paper); box-shadow: 0 5px 20px #00000020; pointer-events: none; font-size: 12px; line-height: 1.65; }
.contribution-tooltip[hidden] { display: none; }
.contribution-tooltip strong, .contribution-tooltip span { display: block; }
.contribution-tooltip strong { font-weight: 500; }
.contribution-tooltip span { opacity: .8; }
.level-0 { fill: var(--heat-0); background: var(--heat-0); }
.level-1 { fill: var(--heat-1); background: var(--heat-1); }
.level-2 { fill: var(--heat-2); background: var(--heat-2); }
.level-3 { fill: var(--heat-3); background: var(--heat-3); }
.level-4 { fill: var(--heat-4); background: var(--heat-4); }
.github-legend { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.github-legend > span:first-child { margin-right: 3px; }
.github-legend > span:last-child { margin-left: 3px; }
.contribution-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 2px; }
.research-entry { max-width: 760px; }
.research-entry h3 { font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.3; letter-spacing: -.005em; }
.research-entry p { margin-top: 15px; font-size: 15px; color: var(--muted); line-height: 1.8; }
.research-entry .research-meta { margin-top: 12px; font-size: 13px; }
.case-sections section { margin-top: 24px; }
.case-sections h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.3; }
.case-sections p { font-size: 14px; line-height: 1.85; color: var(--muted); margin-top: 7px; }
.experience-entry + .experience-entry { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 26px; }
.experience-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 13px; }
.experience-heading h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -.005em; line-height: 1.25; }
.experience-entry p { font-size: 15px; color: var(--muted); line-height: 1.8; }
.experience-entry > p { max-width: 760px; }
.experience-entry > p + p { margin-top: 8px; }
.experience-heading .experience-company { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 13px; }
.experience-company span { color: var(--muted); }
.experience-heading .experience-date { font-size: 13px; flex-shrink: 0; }
.course { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 30px; padding: 27px 0; }
.course:first-of-type { padding-top: 0; }
.course + .course { border-top: 1px solid var(--line); }
.course:last-of-type { padding-bottom: 0; }
.course-photo { display: block; width: 100%; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--heat-0); cursor: zoom-in; }
.course-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.course-gallery { position: relative; width: 100%; max-width: 200px; padding: 0 16px 16px 0; }
.course-gallery .course-photo { position: relative; z-index: 2; border: 2px solid var(--paper); box-shadow: 0 2px 8px #00000015; }
.course-gallery .course-photo:nth-child(2) { position: absolute; top: 16px; left: 16px; width: calc(100% - 16px); z-index: 1; }
.course-gallery .course-photo:hover, .course-gallery .course-photo:focus-visible { z-index: 3; }
.course-info h3 { font-family: var(--serif); font-size: 27px; font-weight: 500; line-height: 1.25; letter-spacing: -.005em; }
.course-info p { margin-top: 9px; font-size: 13px; color: var(--muted); }
.certificate-preview { background: white; border: 1px solid var(--line); }
.certificate-preview img { object-fit: contain; }
.certificate-link { display: inline-block; margin-top: 17px; font-size: 13px; color: var(--green); text-decoration: none; text-underline-offset: 4px; text-decoration-color: var(--link-line); }
.certificate-link:hover { text-decoration: underline; text-decoration-color: var(--green); }
.photo-dialog { width: min(1050px, calc(100% - 32px)); max-height: 94vh; padding: 18px; }
.photo-dialog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.photo-dialog-toolbar p { font-size: 13px; color: var(--muted); white-space: pre-line; }
.photo-stage { position: relative; min-height: 120px; }
.photo-dialog img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; touch-action: pan-y; user-select: none; }
.photo-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0 0 4px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 30px; line-height: 1; box-shadow: 0 2px 10px #00000020; }
.photo-nav:hover { background: var(--soft-hover); }
.photo-prev { left: 12px; }
.photo-next { right: 12px; }
.photo-nav[hidden], .photo-counter[hidden] { display: none; }
.photo-counter { text-align: center; margin-top: 10px; color: var(--muted); font-size: 12px; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 90px; }
.about p { font-size: 15px; color: var(--muted); line-height: 1.8; }
.about p + p { margin-top: 16px; }
.about p a { color: var(--green); text-decoration: none; text-underline-offset: 4px; text-decoration-color: var(--link-line); }
.about p a:hover { text-decoration: underline; text-decoration-color: currentColor; }
.interests h3 { font-size: 14px; font-weight: 500; line-height: 1.5; }
.interests dl { margin: 8px 0 0; }
.interests dl > div { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.8fr); align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.interests dt { font-size: 13px; }
.interests dd { min-width: 0; margin: 0; font-size: 12px; color: var(--muted); text-align: left; overflow-wrap: anywhere; }
.contact > p { font-size: 15px; line-height: 1.8; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 24px 0 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 12px; }
.footer-links a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 4px; }
.footer-links a:hover { background: var(--soft-hover); color: var(--green); }
.footer-links svg { width: 21px; height: 21px; }
.footer-copyright { margin-left: auto; font-size: 13px; line-height: 1.7; text-align: right; }
.footer-signature { white-space: nowrap; }
.footer-signature strong { font-weight: 700; }
dialog { width: min(620px, calc(100% - 32px)); max-height: 85vh; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 30px 36px; box-shadow: 0 24px 100px #20252230; }
dialog::backdrop { background: #20252270; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog-header .eyebrow { font-size: 12px; color: var(--muted); }
.close-dialog { background: none; border: 1px solid var(--line); border-radius: 50%; width: 32px; height: 32px; flex-shrink: 0; font-size: 12px; }
dialog h2 { font-size: 32px; margin-bottom: 16px; }
.dialog-intro { font-size: 14px; color: var(--muted); }
.case-outline { padding-left: 20px; margin: 28px 0 0; }
.case-outline li { padding-left: 8px; margin-top: 20px; font-size: 13px; color: var(--green); }
.case-outline h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.case-outline p { font-size: 13px; margin-top: 5px; color: var(--muted); }
body:has(dialog[open]) { overflow: hidden; }
.cv-dialog { width: min(1100px, calc(100% - 32px)); max-width: none; height: 92dvh; max-height: 1000px; padding: 0; overflow: hidden; }
.cv-dialog[open] { display: flex; flex-direction: column; }
.cv-toolbar { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cv-dialog h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.cv-actions { display: flex; align-items: center; gap: 20px; }
.cv-download { color: var(--green); font-size: 13px; }
.cv-download:hover { text-decoration: underline; text-underline-offset: 4px; }
.cv-zoom-controls { display: flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.cv-zoom-controls button { min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 3px; background: transparent; font-size: 19px; line-height: 1; }
.cv-zoom-controls #cv-zoom-reset { font-size: 12px; }
.cv-zoom-controls button:hover:not(:disabled) { background: var(--soft-hover); }
.cv-zoom-controls button:disabled { opacity: .35; cursor: default; }
.cv-document { display: flex; flex: 1; min-height: 0; padding: 20px; overflow: auto; overscroll-behavior: contain; background: var(--surface); }
.cv-document:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.cv-document img { display: block; flex-shrink: 0; width: 100%; max-width: none; height: auto; margin: auto; background: white; box-shadow: 0 2px 12px #00000015; }
@media (max-width: 760px) {
  .page { padding: 0 24px; }
  .header { min-height: 80px; height: auto; flex-wrap: wrap; gap: 12px; padding: 20px 0; }
  .header-actions { gap: 12px; }
  nav { gap: 16px; font-size: 13px; }
  .wordmark { font-size: 20px; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding: 28px 0 34px; }
  h1 { font-size: 48px; }
  .specialty { font-size: 18px; }
  .intro { font-size: 15px; }
  .portrait { justify-self: start; max-width: 250px; margin-inline-end: 0; }
  .section { padding: 21px 0 34px; }
  h2 { font-size: 32px; margin-bottom: 24px; }
  .github-profile { font-size: 12px; }
  .github-panel { padding: 18px 12px 14px; }
  .project-card { grid-template-columns: minmax(0, 1fr); }
  .project-content { padding: 24px; }
  .project h3 { font-size: 27px; }
  .research-entry h3 { font-size: 26px; }
  .project-visual { border-left: 0; border-top: 1px solid var(--line); min-height: 0; aspect-ratio: 16 / 10; padding: 22px; }
  .architecture { aspect-ratio: auto; }
  .node { min-width: 100px; padding: 8px 10px; }
  .node-main { min-width: 150px; }
  .course { grid-template-columns: 1fr; gap: 19px; padding: 25px 0; }
  .experience-heading { flex-direction: column; gap: 6px; }
  .experience-heading h3 { font-size: 25px; }
  .course-photo { max-width: 340px; }
  .course-gallery { max-width: 220px; }
  .course-info h3 { font-size: 25px; }
  .course-info p { font-size: 13px; }
  .photo-dialog-toolbar { gap: 12px; }
  .photo-dialog-toolbar p { font-size: 12px; }
  .about-grid { grid-template-columns: 1fr; gap: 25px; }
  dialog { padding: 24px; }
  dialog h2 { font-size: 28px; }
  .cv-dialog { width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: none; margin: 8px; }
  .cv-toolbar { padding: 12px 14px; }
  .cv-dialog h2 { font-size: 25px; }
  .cv-actions { gap: 16px; }
  .cv-document { padding: 12px; }
}
@media (max-width: 480px) {
  footer { flex-direction: column; align-items: flex-start; }
  .footer-copyright { margin-left: 0; text-align: left; }
}
@media (max-width: 360px) {
  .page { padding: 0 18px; }
  nav { gap: 14px; font-size: 13px; }
  .wordmark { font-size: 20px; }
  h1 { font-size: 44px; }
  .specialty { font-size: 18px; }
  .project-content { padding: 20px; }
  .project-visual { padding: 20px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.project-story { font-size: 14px; line-height: 1.85; color: var(--muted); }
.project-story p + p { margin-top: 18px; }

.project .project-technologies { margin-top: 18px; font-size: 12px; line-height: 1.7; color: var(--green); }
.technical-sections > section { margin-top: 20px; }
.technical-sections h3 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.3; }
.technical-sections p { margin-top: 7px; font-size: 14px; line-height: 1.85; color: var(--muted); }

html:has(.project-dialog[open]) { overflow: hidden; }
.project-dialog { width: min(760px, calc(100% - 32px)); height: min(86dvh, 820px); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; }
.project-dialog[open] { display: flex; flex-direction: column; }
.project-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; flex-shrink: 0; gap: 20px; padding: 24px 30px 18px; }
.project-dialog-header h2 { min-width: 0; margin: 0; font-size: 28px; line-height: 1.25; overflow-wrap: anywhere; }
.project-dialog-header .close-dialog { width: 36px; height: 36px; }
.project-tabs { display: flex; flex-shrink: 0; gap: 24px; padding: 0 30px; border-bottom: 1px solid var(--line); }
.project-tab { min-height: 44px; padding: 10px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; line-height: 1.5; }
.project-tab[aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
.project-tab:hover { color: var(--green); }
.project-tab:focus-visible { outline-offset: -3px; }
.project-dialog-content { flex: 1; min-height: 0; padding: 24px 30px 30px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.project-tabpanel { min-width: 0; overflow-wrap: anywhere; }
.project-tabpanel[hidden] { display: none; }
.project-tabpanel:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.project-dialog-meta { margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.project-tabpanel .technical-sections > section:first-child,
.project-tabpanel .case-sections > section:first-child { margin-top: 0; }
.project-dialog-meta + .dialog-intro + .case-sections { margin-top: 24px; }
@media (max-width: 760px) {
  .project-dialog { width: calc(100% - 16px); height: calc(100dvh - 32px); max-height: calc(100dvh - 32px); }
  .project-dialog-header { gap: 12px; padding: 20px 20px 14px; }
  .project-dialog-header h2 { font-size: 24px; }
  .project-tabs { gap: 24px; padding: 0 20px; }
  .project-dialog-content { padding: 20px; }
}
@media (max-height: 500px) {
  .project-dialog { height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .project-dialog-header { padding: 12px 20px 8px; }
  .project-dialog-header h2 { font-size: 20px; }
  .project-dialog-content { padding-top: 16px; }
}

.contact.section { padding-bottom: 24px; }
.contact h2 { margin-bottom: 22px; }
.contact-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-top: 8px; }
.contact-links a { font-size: 15px; font-weight: 500; line-height: 1.5; }
.contact-email { max-width: 100%; color: var(--green); overflow-wrap: anywhere; }
.contact-email:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.contact-secondary { color: var(--green); }
.contact-secondary:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) {
  .contact-links { flex-direction: column; align-items: flex-start; gap: 8px; }
}


.screenshot-button { display: block; width: 100%; padding: 0; border: 0; background: #0e1117; cursor: zoom-in; }
.screenshot-button img { display: block; width: 100%; height: auto; }
.screenshot-button:focus-visible { outline-offset: -4px; }
.project-screenshot-gallery { display: grid; gap: 26px; margin-top: 28px; }
.project-screenshot { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; }
.project-screenshot figcaption { padding: 10px 12px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.anamvis-summary, .project-summary { min-width: 0; }
.anamvis-heading, .project-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.project .anamvis-date, .project .project-date { flex-shrink: 0; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.anamvis-card .project-meta, .wizard-card .project-meta { margin-top: 8px; }
.anamvis-card .text-link, .wizard-card .text-link[data-project] { margin-top: 20px; color: var(--green); }
.anamvis-card .text-link:hover, .wizard-card .text-link[data-project]:hover { color: var(--ink); }
.anamvis-highlights, .project-highlights { margin: 16px 0 0; padding-left: 16px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.anamvis-highlights li + li, .project-highlights li + li { margin-top: 5px; }
.anamvis-card .anamvis-technologies, .wizard-card .project-technologies { margin-top: 14px; font-size: 12px; line-height: 1.7; }
.project-visual.anamvis-cover, .project-visual.project-gallery { min-height: 0; aspect-ratio: auto; padding: 24px 18px; background: var(--surface); color: var(--muted); }
.anamvis-cover-button, .project-gallery-button { background: transparent; color: inherit; text-align: right; touch-action: pan-y; }
.anamvis-cover-button:focus-visible, .project-gallery-button:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.anamvis-cover-window { position: relative; display: block; aspect-ratio: 1900 / 1260; overflow: hidden; background: var(--surface); border: 0; border-radius: 4px; }
.anamvis-cover-window img { display: block; width: 100%; height: 100%; object-fit: contain; }
.anamvis-cover-window.is-follow-up img { position: absolute; width: 168.421053%; max-width: none; height: auto; left: -47.368421%; top: -11.111111%; }
.anamvis-expand-indicator, .project-expand-indicator { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--muted); border-radius: 3px; background: var(--paper); color: var(--muted); pointer-events: none; }
.anamvis-expand-indicator svg, .project-expand-indicator svg { width: 17px; height: 17px; }
.anamvis-cover-button:hover .anamvis-expand-indicator, .project-expand-indicator { background: var(--soft-hover); border-color: var(--ink); color: var(--ink); }
.anamvis-cover-button:focus-visible .anamvis-expand-indicator, .project-expand-indicator { background: var(--paper); border-color: var(--green); color: var(--green); }
.anamvis-carousel-controls, .project-carousel-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; align-items: center; gap: 8px; margin-top: 6px; }
.anamvis-carousel-navigation, .project-carousel-navigation { display: flex; align-items: center; gap: 4px; }
.anamvis-carousel-navigation button, .project-carousel-navigation button { width: 36px; min-height: 40px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
.anamvis-carousel-navigation button:hover, .project-carousel-navigation button:hover { background: var(--soft-hover); color: var(--ink); }
.anamvis-carousel-navigation button:focus-visible, .project-carousel-navigation button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
#anamvis-image-counter, .project-image-counter { min-width: 40px; font-size: 12px; text-align: center; }
#anamvis-image-caption, .project-image-caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.5; }
.screenshot-viewer-note { flex-shrink: 0; margin: 0; padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 12px; line-height: 1.5; }
@media (max-width: 760px) {
  .project-visual.anamvis-cover, .project-visual.project-gallery { padding: 20px 14px; }
}
.wizard-technical-visuals { margin-top: 26px; }
.wizard-technical-visuals > h3 { margin: 0 0 16px; font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.3; }
.wizard-workflow { padding: 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.wizard-technical-visuals .project-screenshot { margin-top: 26px; }
.screenshot-dialog { width: min(1440px, calc(100% - 32px)); height: 94dvh; max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; }
.screenshot-dialog[open] { display: flex; flex-direction: column; }
.screenshot-header { display: flex; flex-shrink: 0; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.screenshot-header h2 { margin: 0; font-size: 24px; line-height: 1.3; }
.screenshot-controls { display: flex; flex-shrink: 0; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.screenshot-navigation, .screenshot-zoom { display: flex; align-items: center; gap: 4px; }
.screenshot-controls button { min-width: 38px; min-height: 40px; padding: 6px 10px; border: 0; background: transparent; border-radius: 3px; font-size: 13px; line-height: 1.4; }
.screenshot-controls button:hover:not(:disabled) { background: var(--soft-hover); }
.screenshot-controls button:disabled { opacity: .35; cursor: default; }
#screenshot-counter { min-width: 42px; font-size: 12px; text-align: center; color: var(--muted); }
#screenshot-prev, #screenshot-next, #screenshot-zoom-in, #screenshot-zoom-out { font-size: 22px; }
.screenshot-stage { display: flex; flex: 1; min-height: 0; padding: 16px; overflow: auto; overscroll-behavior: contain; background: var(--surface); }
.screenshot-stage img { display: block; flex-shrink: 0; max-width: none; width: 1px; height: auto; margin: auto; }
.screenshot-stage:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
html:has(.screenshot-dialog[open]) { overflow: hidden; }
@media (max-width: 760px) {
  .screenshot-dialog { width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .screenshot-header { padding: 12px; }
  .screenshot-header h2 { font-size: 20px; }
  .screenshot-controls { padding: 4px 8px; }
  .screenshot-stage { padding: 8px; }
}


.wizard-cover-window { position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden; border: 0; border-radius: 4px; background: transparent; }
.wizard-cover-window.is-conversation { gap: 16px; background: #0e1117; }
.wizard-chat-excerpt, .wizard-chat-input { position: relative; display: block; width: 100%; overflow: hidden; }
.wizard-cover-window.is-conversation .wizard-chat-excerpt { aspect-ratio: 2640 / 850; }
.wizard-cover-window.is-conversation .wizard-chat-input { aspect-ratio: 2640 / 110; }
.wizard-cover-window.is-conversation img { position: absolute; width: 109.090909%; max-width: none; height: auto; left: -4.545455%; }
.wizard-cover-window.is-conversation .wizard-chat-excerpt img { top: -23.529412%; }
.wizard-cover-window.is-conversation .wizard-chat-input img { top: -1481.818182%; }
.wizard-cover-window:not(.is-conversation) .wizard-chat-input { display: none; }
.wizard-cover-window:not(.is-conversation) .wizard-chat-excerpt { height: auto; }
.wizard-cover-window:not(.is-conversation) .wizard-chat-excerpt img { display: block; width: 100%; height: auto; }
.wizard-card .project-actions .text-link { margin-top: 20px; }
.wizard-card .project-actions a { color: var(--muted); }
.thesis-qualification { margin-top: 12px; }
.thesis-qualification + .project-story { margin-top: 24px; }
.wizard-technical-sections > section + section { margin-top: 28px; }
.wizard-workflow { margin-top: 16px; }

/* AnamVis implementation notes and responsive architecture diagram. */
.anamvis-technical-sections > section + section { margin-top: 28px; }
.anamvis-architecture { margin: 12px 0 14px; }
.architecture-button { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--node-border); border-radius: 4px; background: var(--surface); color: var(--green); text-align: right; }
.architecture-button picture, .architecture-button img { display: block; width: 100%; height: auto; }
.architecture-enlarge { display: block; padding: 8px 12px; font-size: 12px; line-height: 1.5; }
.architecture-button:hover .architecture-enlarge { background: var(--soft-hover); text-decoration: underline; text-underline-offset: 3px; }
.architecture-button:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.retrieval-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; margin: 16px 0; padding: 0; list-style: none; color: var(--green); font-size: 12px; line-height: 1.6; }
.retrieval-flow li { display: flex; align-items: center; }
.retrieval-flow li:not(:last-child)::after { content: "→"; padding: 0 10px; color: var(--muted); }
.anamvis-technical-stack, .project-technical-stack { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }
.anamvis-technical-stack span, .project-technical-stack span { color: var(--ink); font-weight: 500; }
.screenshot-navigation[hidden] { display: none; }
@media (max-width: 600px) {
  .retrieval-flow { display: block; }
  .retrieval-flow li { display: block; }
  .retrieval-flow li:not(:last-child)::after { content: "↓"; display: block; padding: 2px 0; }
}

/* Keep the original screenshots and fit portrait captures without adding a frame. */
.ironbuddy-cover-window { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; }
.ironbuddy-cover-window img { width: auto; max-width: 100%; height: auto; max-height: 340px; object-fit: contain; border-radius: 4px; }
@media (max-width: 760px) {
  .ironbuddy-cover-window img { max-height: 360px; }
}
